Closed leeoniya closed 1 year ago
IIRC scroll can't be canceled. Other events are usually added imperatively in the mousedown
, etc event handlers.
I thought about it, and I think that it is not that useful in practice.
k, i'll re-open this if testing with https://github.com/zzarcon/default-passive-events reveals anything interesting in actual use.
i've seen
@scroll:passive=${onScroll}
proposed before, which i'm a fan ofother:
https://terodox.tech/lit-html-part-3/#event-listener-options https://github.com/zzarcon/default-passive-events
if ivi made some events passive by default, that would be even better, but also magical :(
https://github.com/zzarcon/default-passive-events/blob/664c0d25cdb81a4f78f589321e613971e8279cf8/src/index.js#L7-L11
i don't think all of these are needed, just the ones that can fire hundreds of events per sec:
mousemove touchmove drag scroll resize