blob: fc3d8b4b935f583ac515fcaf853ffa4c5371c0d8 [file] [log] [blame]
<head>
<script>
function print(message)
{
var paragraph = document.createElement("li");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test(event)
{
if (window.testRunner)
testRunner.dumpAsText();
print("Received an event, type is " + event.type);
print("Target is " + event.target);
print("Trying to change the type to unload");
event.initEvent("unload", true, true);
print("Event type is now " + event.type);
}
</script>
</head>
<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>
<hr>
<p><ol id=console></ol></p>
</body>