Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html>
<head>
<title>CSSOM - StyleSheetList does not include adopted style sheets</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style id="sheet1">
body { width: 50%; }
</style>
</head>
<body>
<script>
test(() => {
const sheet = new CSSStyleSheet();
document.adoptedStyleSheets = [sheet];
var styleSheets = document.styleSheets;
assert_equals(styleSheets.length, 1);
assert_equals(styleSheets[0], sheet1.sheet);
}, 'document.styleSheets does not include adopted style sheets');
</script>
</body>
</html>