title: Disable and enable all event listeners for a given event name
body: <p>I am using a JS library which binds some DOM events with event listeners of its own.</p>
  <p>What I want to do is, given an specific event (e.g. <code>touchstart</code>), prevent the event listeners in the library from being called. I'd like something like:</p>
  <pre><code>// Maybe get some dictionary with the list of disabled events listeners
  // for each element in the DOM, indexed by the elements themselves
  disabledListeners = document.disableEventListenersFor('touchstart')
  </code></pre>
  <p>After that, I would like to be able to re-enable the disabled bindings:</p>
  <pre><code>document.enableEventListenersFor('touchstart', disabledListeners);
  </code></pre>
  <p>Specifically, I want to be able to switch back and forth between two modes in the application: one that reacts to all touch events and one that doesn't.</p>
  <p><strong>Edit</strong>: Years have passed, but I think this question might still be interesting. I don't remember exactly what solution I came to, but as I remember, I tried editing the (obfuscated) source of the library itself, every time it bound a listener.</p>