tor-browser

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

style-element-media-not-match-does-not-block-script.html (575B)


      1 <!DOCTYPE html>
      2 <title>Style element is not script-blocking when media doesn't match</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="support/utils.js"></script>
      6 <style media="print">
      7 @import url('stylesheet.py?delay=1');
      8 </style>
      9 <h1>Some text</h1>
     10 <script>
     11 test(() => {
     12  assert_false(styleExists("h1 { color: purple; }"),
     13               'stylesheet should still be pending');
     14  const h1 = document.querySelector('h1');
     15  assert_equals(getComputedStyle(h1).color, 'rgb(0, 0, 0)');
     16 });
     17 </script>