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

⚡️ Make all event listeners passive #93

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

alecgibson
Copy link
Collaborator

Fixes #92

If an event listener never invokes preventDefault(), it can be marked as passive.

We don't call preventDefault() anywhere in our code, so we can safely mark all of our event listeners as passive.

Fixes #92

If an event listener never invokes `preventDefault()`, it can be marked
as [passive][1].

We don't call `preventDefault()` anywhere in our code, so we can safely
mark all of our event listeners as passive.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#using_passive_listeners
@alecgibson alecgibson requested a review from a team May 31, 2024 07:43
@alecgibson alecgibson merged commit 2c9f496 into main May 31, 2024
1 check passed
@alecgibson alecgibson deleted the passive-listeners branch May 31, 2024 08:29
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.

Event listeners should be passive
2 participants