tor-browser

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

has-display-none-checked.html (910B)


      1 <!doctype html>
      2 <html class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>:has() invalidation inside display: none subtree</title>
      5 <link rel="author" href="mailto:emilio@crisal.io" title="Emilio Cobos Álvarez">
      6 <link rel="author" href="https://mozilla.org" title="Mozilla">
      7 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1875137">
      8 <link rel="help" href="https://drafts.csswg.org/selectors/#relational">
      9 <link rel="match" href="has-display-none-checked-ref.html">
     10 <style>
     11 body:has(input:checked) #fail {
     12  display: none;
     13 }
     14 body:not(:has(input:checked)) #pass {
     15  display: none;
     16 }
     17 </style>
     18 <div style="display: none">
     19  <input type="checkbox" id="on">
     20 </div>
     21 <div id="fail">FAIL</div>
     22 <div id="pass">PASS</div>
     23 <script>
     24  document.addEventListener("TestRendered", function() {
     25    document.querySelector("input").checked = true;
     26    document.documentElement.className = "";
     27  });
     28 </script>