Back to all skills
Progress15 of 47
ClientMedium
Use Passive Event Listeners for Scrolling Performance
Add `{ passive: true }` to touch and wheel event listeners to enable immediate scrolling. Browsers normally wait for listeners to finish to check if `preventDefault()` is called, causing scroll delay.
clientevent-listenersscrollingperformancetouchwheel
Code Comparison
•Incorrect:typescript
•Correct:typescript
Why This Matters
Impact: eliminates scroll delay caused by event listeners. This optimization is classified as MEDIUM priority for production applications.