blob: da755cb7cc9dfbc1cdf6b2d3f8f0edffe976fe7d [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.layoutTestController)
layoutTestController.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>