1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../js-test-resources/js-test.js"></script>
6 <body onload=
"debug('load');finishJSTest();">
7 Checks that async=false enforces execution order dynamically inserted scripts.
8 See: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting-
1.html#force-async
9 <div id=
"console"></div>
11 var jsTestIsAsync
= true;
13 slowly_loaded_script
= document
.createElement("script");
14 slowly_loaded_script
.async
= false;
15 slowly_loaded_script
.src
= "resources/slow-async-script.cgi";
16 document
.getElementsByTagName("head")[0].appendChild(slowly_loaded_script
);
17 slowly_loaded_script
.async
= true; // Should have no effect, becaus script has already been requested.
19 quickly_loaded_script
= document
.createElement("script");
20 quickly_loaded_script
.async
= false;
21 quickly_loaded_script
.src
= "resources/async-script.js";
22 document
.getElementsByTagName("head")[0].appendChild(quickly_loaded_script
);
23 quickly_loaded_script
.async
= true; // Should have no effect, becaus script has already been requested.