Passive Event Listeners (EventListenerOptions)
An extension to the DOM event pattern to allow listeners to disable support for preventDefault, primarily
to enable scroll performance optimizations. See the explainer document for an overview.
Spec changes
- See the main commit in the DOM specification or pull request for full details.
- The key parts of the spec affected by this are EventTarget, Observing event listeners, and preventDefault
- Touch Events has been updated to describe the performance optimization.
Status of implementations:
- Chromium: shipping in Chrome 51 (launch bug)
- Polyfill
- WebKit bug
Additional background on the problem:
- Ilya Grigorik's talk at Chrome Dev Summit [slides]
- Discussion on twitter with demo video
- Demo page with latency measurement
- Chrome bug tracking the plan to "intervene" and force touch listeners to be passive in scenarios where the compat risk is low but the perf benefit large.
- Older G+ post by Rick Byers
Issues with and adoption by key libraries:
History:
- Outstanding issues
- WICG discussion
- Discussion on WhatWG
- One discussion on public-pointer-events
- Earlier scroll-blocks-on proposal and discussion