4 <script src="/js-test-resources/js-test.js"></script>
6 window.jsTestIsAsync = true;
7 testRunner.waitUntilDone();
9 var givenLoadEventTargets = [];
10 function handleLoad(event)
12 givenLoadEventTargets.push(event.target.id);
13 if (givenLoadEventTargets.length == 4) {
14 shouldBe("['bye', 'hello1', 'hello2', 'hello3']", "givenLoadEventTargets.sort()");
19 <link id="hello1" rel="import" href="resources/hello.html" onload="handleLoad(event)">
20 <link id="hello2" rel="import" href="resources/hello.html" onload="handleLoad(event)">
24 var linkToInsert = document.createElement("link");
25 linkToInsert.id = "bye";
26 linkToInsert.setAttribute("rel", "import");
27 linkToInsert.setAttribute("href", "resources/bye.html");
28 linkToInsert.onload = handleLoad;
29 document.head.appendChild(linkToInsert);
31 <link id="hello3" rel="import" href="resources/hello.html" onload="handleLoad(event)">