5 if (window
.testRunner
) {
6 testRunner
.waitUntilDone();
7 testRunner
.dumpAsText();
11 var div
= document
.createElement("div");
12 div
.appendChild(document
.createTextNode(msg
));
13 document
.getElementById("result").appendChild(div
);
17 if (window
.testRunner
)
18 testRunner
.notifyDone();
21 window
.onload = function () {
24 // The setTimeout handlers will get called after the
26 postMessage("Message1", "*");
27 postMessage("Message2", "*");
28 postMessage("Message3", "*");
29 setTimeout("log('setTimeout1')", 0);
30 setTimeout("log('setTimeout2')", 0);
35 addEventListener("message", function (e
) {
36 log("Capture phase: " + e
.data
);
38 addEventListener("message", function (e
) {
39 log("Bubble phase: " + e
.data
);
42 document
.addEventListener("message", function (e
) {
43 log("FAIL: Capture phase (document): " + e
.data
);
45 document
.addEventListener("message", function (e
) {
46 log("FAIL: Bubble phase (document): " + e
.data
);
51 <div id=
"result">waiting...
</div>