1 <p>Tests for image elements firing their load events even when they're not in the document. Should say
"onload fired" ten times, and then
"PASS".
</p>
2 <pre id=
"console"></pre>
4 <script src=
"../../resources/js-test.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
13 return document
.getElementById(id
);
18 $("console").appendChild(document
.createTextNode(s
+ "\n"));
23 function createImage()
26 var image
= new Image
;
27 image
.src
= "resources/apple.gif";
28 image
.onload = function () {
29 log("onload fired...");
35 if (window
.testRunner
)
36 testRunner
.notifyDone();
42 for (var i
= 0; i
< 10; ++i
)