StyleSheetList-constructable-with-style-recalc.html (798B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSSOM - StyleSheetList does not include adopted style sheets even after style recalc</title> 5 <link rel="help" href="https://crbug.com/437259105"> 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 document.body.offsetTop; 19 20 var styleSheets = document.styleSheets; 21 assert_equals(styleSheets.length, 1); 22 assert_equals(styleSheets[0], sheet1.sheet); 23 }, 'document.styleSheets does not include adopted style sheets'); 24 </script> 25 </body> 26 </html>