From 692865457d555258141b2e72ff10fbb5c040e4f4 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 17 Sep 2018 15:30:38 +0200 Subject: [PATCH] DOM: eventPhase during legacy-pre-activation behavior For https://github.com/whatwg/dom/pull/686. --- dom/events/legacy-pre-activation-behavior.window.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 dom/events/legacy-pre-activation-behavior.window.js diff --git a/dom/events/legacy-pre-activation-behavior.window.js b/dom/events/legacy-pre-activation-behavior.window.js new file mode 100644 index 00000000000000..e9e84bfad1e6f7 --- /dev/null +++ b/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");