Intent to prototype and ship: signal property on AddEventListenerOptions

94 views
Skip to first unread message

smaug

unread,
Dec 3, 2020, 9:23:41 AM12/3/20
to
Summary: https://github.com/whatwg/dom/issues/911 proposes to add signal property to AddEventListenerOptions
const ac = new AbortController();
target.addEventListener('fooEvent', (e) => { ... }, { signal: ac.signal } );
so that one can easily remove the event listener when AbortController is aborted: ac.abort();

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1679204

Standard: https://github.com/whatwg/dom/issues/911
Platform coverage: All

Preference: No pref. Web sites need to explicitly opt-in to use this new feature..
DevTools bug: NA. I guess devtools could have some UI for various AddEventListenerOptions properties, but that is a generic issue.
Other browsers: Implemented in blink https://bugs.chromium.org/p/chromium/issues/detail?id=1146467, not yet enabled by default
Also in Node.js https://github.com/whatwg/dom/pull/919#issuecomment-737293442

web-platform-tests: wpt tests are being reviewed https://github.com/web-platform-tests/wpt/pull/26472


The patch will land only after the wpt tests are in mozilla-central, and not before the next merge, so targeting 86.





-Olli
Reply all
Reply to author
Forward
0 new messages