4 if (window
.testRunner
) {
5 testRunner
.dumpAsText();
6 testRunner
.waitUntilDone();
10 document
.getElementById("log").innerHTML
+= msg
;
17 Test that a synchronous script tag is executed in the right order, even if it's
18 removed from the document before it was loaded.
21 This test passes if the number
"4123" is displayed below.
26 // All these scripts should be executed after the next script tag.
27 var s1
= document
.createElement("script");
28 s1
.src
= "resources/delayed-log.php?delay=3&msg=1";
30 document
.body
.appendChild(s1
);
32 var s2
= document
.createElement("script");
33 s2
.src
= "resources/delayed-log.php?delay=2&msg=2";
35 document
.body
.appendChild(s2
);
37 var s3
= document
.createElement("script");
38 s3
.src
= "resources/delayed-log.php?delay=1&msg=3&done=1";
40 document
.body
.appendChild(s3
);
42 // s1 should still execute, and it should execute before s2 and s3.
43 document
.body
.removeChild(s1
);
45 <script>log("4");</script>