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

Reorder normalizeEmitter with addEventListener and removeEventListener before on and off to standardize behavior between environments #45

Closed
vveisard opened this issue Mar 2, 2024 · 0 comments · Fixed by #46

Comments

@vveisard
Copy link
Contributor

vveisard commented Mar 2, 2024

Node's EventTarget on/ off handlers are different than its add/ remove listener handlers. In my case, this changed the behavior of p-event with MessagePort between node and bun. It makes sense to prioritize add/ remove listener handlers, which are standardized between node and web/ bun/ deno.

I would also like the type definitions to be more accurate, because this caught me by surprise.

@vveisard vveisard changed the title Reorder normalizeEmitter with addEventListener and removeEventListener before on and off to standardize behavior environments Reorder normalizeEmitter with addEventListener and removeEventListener before on and off to standardize behavior between environments Mar 2, 2024
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 a pull request may close this issue.

1 participant