currentScript-null.html (710B)
1 <!DOCTYPE html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <script type="module" src="set-currentScript-on-window.js"></script> 5 <script type="module"> 6 import { currentScriptOnImportedModule } from "./currentscript.js"; 7 8 test(() => { 9 assert_equals(document.currentScript, null, "document.currentScript on inline scripts should be null"); 10 assert_equals(currentScriptOnImportedModule, null, "document.currentScript on imported scripts should be null"); 11 assert_equals(window.currentScriptRecorded, null, "document.currentScript on external module scripts should be null"); 12 }, "currentScript on script type=module should be all null"); 13 </script>