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

fix(polyfill): dedupe hooks.addEventListener calls #406

Merged
merged 2 commits into from
Aug 9, 2024

Conversation

developit
Copy link
Contributor

@developit developit commented Aug 8, 2024

This fixes hooks.addEventListener() being called even when EventTarget.addEventListener rejects a duplicate listener registration, allowing handler counting to be implemented without maintaining a separate Set of listeners.

The corresponding behavior was already implemented in removeEventListener, so I think this can just be considered a bugfix and landed without the need for any new hook.

…ate listeners in EventTarget.addEventListener

This comment has been minimized.

@lemonmade lemonmade merged commit 2ea3459 into main Aug 9, 2024
5 checks passed
@lemonmade
Copy link
Member

Thanks Jason!

@lemonmade lemonmade deleted the fix/addEventListener-hook-duplicates branch August 9, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants