-
-
Notifications
You must be signed in to change notification settings - Fork 634
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
Support Passive Event Listeners #377
Comments
Currently Inferno adds events using inline way. equivalent to:
To support this feature new way of handling methods is needed. We used to use addEventListener, but that resulted memory leaks and slow rendering because of removeEventListener (to avoid that leak). |
@Havunen this is now a possibility again with our new event system. |
Let's revisit this post 1.0. |
Add to roadmap @lukeed |
Re-opening as this was never implemented |
This looks good, this would have effects in performance. But as far as I have read, this would only be applicable for events that's related to scrolling --> https://developers.google.com/web/tools/lighthouse/audits/passive-event-listeners. Inferno could handle it by supporting event options like so: <span onScroll={{
handler (ev) {
// do something
},
options: {
passive: true
}
}}> OR adding it automatically when the event listener is related to scrolling. There's even a demo video about this --> https://youtu.be/65VMej8n23A |
I think it's good for inferno to support passive listener for |
It would be nice to have support for passive events.
Related: facebook/react#6436
The text was updated successfully, but these errors were encountered: