tor-browser

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

StyleSheetList-constructable.html (772B)


      1 <!DOCTYPE html>
      2 <html>
      3  <head>
      4    <title>CSSOM - StyleSheetList does not include adopted style sheets</title>
      5    <link rel="help" href="https://drafts.csswg.org/cssom/#css-style-sheet-collections">
      6    <script src="/resources/testharness.js"></script>
      7    <script src="/resources/testharnessreport.js"></script>
      8    <style id="sheet1">
      9      body { width: 50%; }
     10    </style>
     11  </head>
     12  <body>
     13    <script>
     14      test(() => {
     15        const sheet = new CSSStyleSheet();
     16        document.adoptedStyleSheets = [sheet];
     17 
     18        var styleSheets = document.styleSheets;
     19        assert_equals(styleSheets.length, 1);
     20        assert_equals(styleSheets[0], sheet1.sheet);
     21      }, 'document.styleSheets does not include adopted style sheets');
     22    </script>
     23  </body>
     24 </html>