Skip to content

Commit

Permalink
DOM: eventPhase during legacy-pre-activation behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk committed Sep 17, 2018
1 parent bec8a89 commit 7c18f59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dom/events/legacy-pre-activation-behavior.window.js
@@ -0,0 +1,10 @@
test(t => {
const input = document.body.appendChild(document.createElement('input'));
input.type = "radio";
t.add_cleanup(() => input.remove());
const clickEvent = new MouseEvent('click', { button: 0, which: 1 });
input.addEventListener('change', t.step_func(() => {
assert_equals(clickEvent.eventPhase, Event.NONE);
}));
input.dispatchEvent(clickEvent);
}, "Use NONE phase during legacy-pre-activation behavior");

0 comments on commit 7c18f59

Please sign in to comment.