0

I am unsure if this is even possible, but basically, I have event listeners that were automatically added to a checkbox control by a library (jQuery).

Inspecting the control in Chrome Developer Tools, under the Event Listeners, I can see that touchmove has been attached to my control.

How would I be able to basically remove that Event Listener, particularly if I don't know the function that was attached to it?

Looking for some advice. Thanks.

enter image description here

aThink
  • 93
  • 2

1 Answers1

0

This will remove the event without knowing what it's attached to.

 function handleTouchMove(e) {
      e.preventDefault();
    }

    document.addEventListener('touchmove', handleTouchMove);
kemotoe
  • 1,623
  • 12
  • 23