-
Notifications
You must be signed in to change notification settings - Fork 295
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
Define "has event listener" operation #453
Comments
As an update, I am planning on working on this within the next few weeks... it ended up being implemented in servo/servo@29d1cf6, more or less by re-using the concept of the 'event-path' |
Interesting. Why not iterate over the listeners of the |
I'm not sure, I think I assumed the entire path had to be checked... So essentially you mean, taking the linked to implementation as a context, just do |
Yeah, I think that's what https://searchfox.org/mozilla-central/rev/ae8c2e2354db652950fe0ec16983360c21857f2a/dom/events/EventListenerManager.cpp#1609-1620 and its callers do so that would match what implementations do. |
Thanks, I'll investigate further and update the Servo implementation. |
whatwg/html#5889 removed "if any event listeners were triggered" from HTML, so this seems to reduce to #660. |
@jakearchibald @jungkees so I guess only service workers still needs this hook? Does #660 work for you? |
XMLHttpRequest also needs this
and has a test at |
For whatwg/html#1900, service workers, and a couple of other cases in the platform, we need to determine whether an object has event listeners for a given event type. It would be good to tie these to a single operation that has a little warning alongside pointing out the issues with it.
The text was updated successfully, but these errors were encountered: