summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/scripting-1/the-script-element/script-defer-xhtml.xhtml
blob: 3f4a50f7790f360d99bfd968a61bdf9d91142255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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>