Skip to content
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

Open
robwierzbowski opened this issue Sep 1, 2016 · 7 comments
Open
Labels
feature New feature request help wanted We'd appreciate some help with this

Comments

@robwierzbowski
Copy link

Hi! Wondering if there are any plans to add new event options (capture, passive, and once). If not, I would be interested in contributing or working with developers to add them (especially once).

@triblondon
Copy link

passive is pointless to polyfill, but once would be good. Naming is interesting. This is documented under EventTarget/addEventListener:

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 Intl, addEventListener.~options might be a good name.

@falsandtru
Copy link

falsandtru commented Oct 3, 2016

@triblondon
Copy link

@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. Event.~options would be a possibility.

@falsandtru
Copy link

I see, I'll try to support the capture option for now.

@matthew-dean
Copy link

matthew-dean commented Nov 2, 2016

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.

@JSteunou
Copy link

See #1386

@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Feb 6, 2019
@JakeChampion JakeChampion added feature New feature request help wanted We'd appreciate some help with this labels Apr 3, 2019
@fvonellerts
Copy link

Has there been any progress on this topic? I usually import https://github.com/github/eventlistener-polyfill for this, the once flag can be very helpful.

@chee chee added this to incoming in Origami ✨ Feb 1, 2020
@robertboulton robertboulton removed this from Backlog in Origami ✨ Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request help wanted We'd appreciate some help with this
Projects
None yet
Development

No branches or pull requests

7 participants