tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

lang-pseudo-class-in-has-document-element.html (969B)


      1 <!DOCTYPE html>
      2 <html class="reftest-wait">
      3 <head>
      4    <link rel="author" title="Ryosuke Niwa" href="mailto:rniwa@webkit.org"/>
      5    <link rel="help" href="https://drafts.csswg.org/selectors/#relational">
      6    <link rel="help" href="https://drafts.csswg.org/selectors/#lang-pseudo">
      7    <link rel="match" href="../../reference/ref-filled-green-100px-square.xht">
      8    <meta http-equiv="content-language" content="fr">
      9 </head>
     10 <body>
     11    <p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
     12    <div><span></span></div>
     13    <style>
     14        div { width: 100px; height: 100px; }
     15        div:has(*:lang(fr)) { background: red; }
     16        div:has(*:lang(en)) { background: green; }
     17    </style>
     18    <script>
     19        requestAnimationFrame(() => {
     20            setTimeout(() => {
     21                document.documentElement.lang = 'en';
     22                document.documentElement.className = '';
     23            }, 0);
     24        });
     25    </script>
     26 </body>
     27 </html>