window-scroll-position
window-scroll-position copied to clipboard
Does it need to be passive?
trafficstars
I was reading the hook source code and I was wondering if it really needs to specify {passive: true}. The scroll event should be passive by default since it cannot be cancelled. Check the last paragraph:
You don't need to worry about the value of passive for the basic scroll event. Since it can't be canceled, event listeners can't block page rendering anyway.