title: AddEventListener with wrapper listener
body: <p>I am trying run custom code whenever a click event is triggered. This is what I have so far:</p>
  <pre><code>const origHandler = EventTarget.prototype.addEventListener;
  EventTarget.prototype.addEventListener = function (eventName, eventHandler, options) {
      let handler = eventHandler;
      const target = this;
      origHandler.call(this, eventName, function (e) {
          // Do something with e
          doSomething(e);
          // Run original function
          handler.call(target, e);
      }, options);
  };
  </code></pre>
  <p>I am also using <a href="https://github.com/wenzhixin/multiple-select" rel="nofollow noreferrer">this multi-select dropdown plugin</a>. With the code above, clicking on the dropdown element doesn't do anything until I click it a couple of times.
  It works fine if I just do the following:</p>
  <pre><code>    origHandler.call(this, eventName, handler, options);
  </code></pre>
  <p>However, the above doesn't allow me to run custom code whenever the handler is called. Is there anything I can do to create a wrapper that also works with these types of plugins?</p>
  <p>This problem is not specific to this plugin, as I have seen a few other plugins in the application also breaking as a result of this code.</p>