Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/scripting-1/the-script-element/scripting-enabled.html - WPT Dashboard Interop Dashboard
<!doctype html>
<meta charset="utf-8">
<title>JS is disabled on documents created without a browsing context</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(function(t) {
var doc = document.implementation.createHTMLDocument();
window.fail_test = t.unreached_func('should not have been called');
var script = doc.createElement('script');
script.textContent = 'fail_test();';
doc.documentElement.appendChild(script);
}, 'script on document returned by createHTMLDocument should not execute');
</script>