wnidow.addEventListener('touchmove', func) //The effect is the same as the following sentence wnidow.addEventListener('touchmove', func, { passive: true }) This leads to a problem: If you call e.preventDefault() in the touchstart and touchmove event handler functions of the above 3 elements, it will be ignored by the browser and will not prevent the default behavior. Common targets are Element, Document, and Window, but the target may be any object that supports events (such as XMLHttpRequest).. addEventListener() works by adding a function or an object that implements …
EventTarget.addEventListener.
Questions: I’m using the scrollTo jQuery plugin and would like to know if it is somehow possible to temporarily disable scrolling on the window element through Javascript?
The EventTarget method addEventListener() sets up a function that will be called whenever the specified event is delivered to the target.