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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
Link
Report message as abuse
Sign in to report message as abuse
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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();