Intent to Implement and Ship: addEventListener AddEventListenerOptions API
64 views
Skip to first unread message
Dave Tapuska
unread,
Apr 26, 2016, 9:24:36 AM4/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
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 blink-dev
dtap...@chromium.orghttps://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener
EventListenerOptions API was added in https://www.chromestatus.com/features/5718574840676352
The spec was revised to add
AddEventListenerOptions which is a dictionary only for addEventListener(...) so that fields could be added that did not make up the matching key. Where the matching key semantics are used for detecting duplicate adds and removal.
This change is to move the add the AddEventListenerOptions dictionary definition, change the API and move the 'passive' field from EventListenerOptions to AddEventListenerOptions
This change does NOT add or implement the 'once' field in the AddEventListenerOptions dictionary.Make the key behaviour on addEventListener explicit. In the original spec it was a little undefined what it should actually match if the UA didn't support the dictionary parameters.
Firefox: Public support
Edge: Public support
Safari: No public signals
Web developers: No signals
Minor API change. Some slight difference in the semantics of a second call to addEventListener.
The dictionary itself is not observable to JavaScript. The main change is the semantics of remove.
In M51;
addEventListener('touchstart', func, {passive: true});
addEventListener('touchstart', func, {passive: false});
would end up adding two listeners. But since passive is no longer part of the key; as proposed in M52; the second add will be a no-op.
The key is made up of only 3 args; eventtype, listener function, capture.
None
You do not have permission to delete messages in this group
Copy link
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 Dave Tapuska, blink-dev
LGTM1
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Chris Harrelson
unread,
Apr 26, 2016, 11:16:07 AM4/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
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 Philip Jägenstedt, Dave Tapuska, blink-dev
LGTM2
Dimitri Glazkov
unread,
Apr 26, 2016, 12:48:05 PM4/26/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
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 Chris Harrelson, Philip Jägenstedt, Dave Tapuska, blink-dev