-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plans for adding new event options (capture, passive, and once) #113
Comments
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener But we already have an addEventListener polyfill, and that basic functionality is already well supported a long way back. I guess mirroring what we did with |
Can I modify https://github.com/Financial-Times/polyfill-service/blob/master/polyfills/Event/polyfill.js to support new options? |
@falsandtru sure, but the trade off is we need to start serving the Event polyfill to new browsers, even though they have the majority of the functionality. So you need to either do some careful feature-testing within the polyfill, or add a separate polyfill for the new bit. |
I see, I'll try to support the |
There's a polyfill here: https://github.com/WICG/EventListenerOptions/blob/gh-pages/EventListenerOptions.polyfill.js However, really the only thing you're polyfilling is useCapture, since there's no way to polyfill passive event listening. Polyfilling "once" might be possible, which isn't included in the above link. |
See #1386 |
Has there been any progress on this topic? I usually import https://github.com/github/eventlistener-polyfill for this, the |
Hi! Wondering if there are any plans to add new event options (
capture
,passive
, andonce
). If not, I would be interested in contributing or working with developers to add them (especiallyonce
).The text was updated successfully, but these errors were encountered: