blob: 992ff1cc97351a9435597b28c8147e9f79ae0c3d [file] [log] [blame]
<!DOCTYPE html>
<title> EventLister member: handleEvent() </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<table id="table" border="1" style="display: none">
<tbody id="table-body">
<tr id="table-row">
<td id="table-cell">Shady Grove</td>
<tr id="parent">
<td id="target">Over the river, Charlie</td>
var EVENT = "foo";
var TARGET = document.getElementById("target");
var TestResult = false;
var description = "Test Description: " +
"handleEvent - This method shall be called whenever an event occurs of the event type for " +
"which the EventListener interface was registered.";
var EventListener = {};
EventListener.handleEvent = function(evt)
if ((EVENT == evt.type) && (TARGET == && (this === EventListener))
TestResult = true;
TestResult = false;
var evt = document.createEvent("Event");
evt.initEvent(EVENT, true, true);
TARGET.addEventListener(EVENT, EventListener, true);
TARGET.removeEventListener(EVENT, EventListener, true);
}, description);