blob: fc3d8b4b935f583ac515fcaf853ffa4c5371c0d8 [file] [log] [blame]
function print(message)
var paragraph = document.createElement("li");
function test(event)
if (window.testRunner)
print("Received an event, type is " + event.type);
print("Target is " +;
print("Trying to change the type to unload");
event.initEvent("unload", true, true);
print("Event type is now " + event.type);
<body onload="test(event)">
<p>This test checks to see if you can change an event after it's dispatched. The DOM standard says that you can't,
and that the various init functions do nothing once an event is dispatched.</p>
<p>If the test passes, the attempts to change an event below should fail.</p>
<p><ol id=console></ol></p>