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/script-defer-xhtml.xhtml - WPT Dashboard Interop Dashboard
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
<head>
<title>XHTML Test: HTMLScriptElement - defer</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<meta charset="utf-8" />
</head>
<body>
<div id="log"></div>
<script>
let script_run_status = "inline";
let t = async_test("the defer script run later");
</script>
<script type="text/javascript" src="defer.js" defer="defer"></script>
<script>
t.step(() => {
assert_equals(script_run_status, "inline", "the script run status");
script_run_status = "deferred";
});
</script>
</body>
</html>