Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/document-metadata/the-style-element/non-parser-created-doc.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS API on style element in non-parser-created document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<script>
test(function() {
let doc = document.implementation.createHTMLDocument("");
let style = doc.createElement("style");
doc.head.appendChild(style)
assert_true(!!style.sheet, "The style element should have the sheet property.");
}, "CSS API should work on non-parser-created documents");
</script>
</body>
</html>