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. This change is to move the add the AddEventListenerOptions dictionary definition, change the API and move the 'passive' field from EventListenerOptions to AddEventListenerOptions



Specification link

Specification currently under development in a Working Group

Status in Chromium


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.



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; in M52; the second add will be a no-op. The key is made up of only 3 args; eventtype, listener function, capture.

Search tags

EventListenerOptions, addEventListener, passive,

Last updated on 2022-05-09