title: Intercept keyup event before an already bound listener
body: <p>I'm using a third-party library, which binds the <code>keyup</code> event using the <code>addEventListener</code> method, as in:</p>
  
  <pre><code>document.addEventListener('keyup', handler);
  </code></pre>
  
  <p>I would like to prevent this listener from firing when a condition is met, like:</p>
  
  <pre><code>$(document).on('keyup', function (e) {
      if (condition) {
          e.stopPropagation();
  
          // ...
      }
  });
  </code></pre>
  
  <p>However, because of the nature of the solution I'm writing, it's impossible for me to bind my handler before the one bound by the external library - the other listener fires up before mine, so I can't actually prevent anything like that.</p>
  
  <p>Is there a way to somehow move my listener before the third-party one? Or somehow hijack the <code>keyup</code> in a different way?</p>