blob: d9a81b1ddd9b0179ed3b75c4ef05dfb7713a5a69 [file] [log] [blame]
<html>
<head>
<script>
var handler = new Object;
handler.handleEvent = function (event) {
document.getElementById("console").appendChild(document.createTextNode("Received event: " + event));
}
function test() {
if (window.testRunner)
testRunner.dumpAsText();
document.addEventListener("event", handler, false);
var event = document.createEvent("Event");
event.initEvent("event", true, true);
document.dispatchEvent(event);
}
</script>
<body onload="test()">
<p>This test creates and sends an event to a handler that's implemented with a handleEvent function.
If the test succeeds, there will be text below saying "Received event".</p>
<div id="console"></div>
</body>
</html>