Open sculove opened 7 years ago
window.addEventListener("scroll", handler); window.addEventListener("resize", handler);
if event is attached at window, change target to document.body https://github.com/naver/hammerjs-compatible/blob/master/src/addeventlistener.js#L62
document.body
@sculove Do you mean currentTraget, not a target?
currentTraget
target
I can't attach event at window which is target.
case
window.addEventListener("scroll", handler); window.addEventListener("resize", handler);
if event is attached at window, change target to
document.body
https://github.com/naver/hammerjs-compatible/blob/master/src/addeventlistener.js#L62