blob: d8ab8d4f26a55fc1d8c86a84a9ab7a1507254bfe [file] [log] [blame]
<!DOCTYPE html>
<title> Event.defaultPrevented is reset after dipatchEvent() </title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<input id="target" type="hidden" value=""/>
var EVENT = "foo";
var TARGET = document.getElementById("target");
var PreState;
var PosState;
var description = "Test Description: " +
"As the final step of the event dispatch, the implementation must reset the event " +
"object's default-action-prevention state. ";
var evt = document.createEvent("Event");
evt.initEvent(EVENT, true, true);
TARGET.addEventListener(EVENT, TestEvent, true);
PosState = evt.defaultPrevented;
assert_array_equals([, PreState, PosState], [TARGET, true, false]);
}, description);
function TestEvent(evt)
PreState = evt.defaultPrevented;