chrisbateman / impetus

Agnostic utility for adding momentum to anything. It's like iScroll, except not for scrolling. Supports mouse and touch events.
chrisbateman.github.io/impetus
MIT License
487 stars 70 forks source link

[Violation] Added non-passive event #39

Closed dy closed 4 years ago

dy commented 6 years ago

To avoid unnecessary warning in console, this and all other touch event listeners can be modified to

window.addEventListener('touchstart', fn, hasPassive ? { passive: true } : false)

for hasPassive can a modernizr-like detector be used or has-passive-events package.

dy commented 6 years ago

@chrisbateman ping

weotch commented 5 years ago

@dy I think this can be closed now, it looks like support was added in https://github.com/chrisbateman/impetus/commit/d5d023aa6085f5a46637f31bb823f94ac21cdac5

dy commented 4 years ago

Great!