window-scroll-position icon indicating copy to clipboard operation
window-scroll-position copied to clipboard

Does it need to be passive?

Open pauldijou opened this issue 6 years ago • 0 comments
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.

pauldijou avatar Sep 30 '19 20:09 pauldijou