Intent to prototype and ship: signal property on AddEventListenerOptions
103 views
Skip to first unread message
smaug
unread,
Dec 3, 2020, 9:23:41 AM12/3/20
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
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();