Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`scroll` listeners are not blocking, however `wheel` ones are. If you've tried to implement a parallax effect in JS you may have noticed the subtle differences on timing between these two (wheel fires before the scroll position is updated, scroll afterwards). That said, yielding immediately within a listener (like you recommend) is indeed a best practice.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: