build/dom4.max.js
function createEventListener(type, callback, options) {
    function eventListener(e) {
      if (eventListener.once) {
        e.currentTarget.removeEventListener(
          e.type,
          callback,
          eventListener
        );
        eventListener.removed = true;
      }
      if (eventListener.passive) {
        e.preventDefault = createEventListener.preventDefault;
      }
      if (typeof eventListener.callback === 'function') {
        /* jshint validthis: true */
        eventListener.callback.call(this, e);
      } else if (eventListener.callback) {
        eventListener.callback.handleEvent(e);
      }
      if (eventListener.passive) {
        delete e.preventDefault;
      }
    }
    eventListener.type = type;
    eventListener.callback = callback;
    eventListener.capture = !!options.capture;
    eventListener.passive = !!options.passive;
    eventListener.once = !!options.once;
    // currently pointless but specs say to use it, so ...
    eventListener.removed = false;
    return eventListener;
  }
function createEventListener(type, callback, options) {
    function eventListener(e) {
      if (eventListener.once) {
        e.currentTarget.removeEventListener(
          e.type,
          callback,
          eventListener
        );
        eventListener.removed = true;
      }
      if (eventListener.passive) {
        e.preventDefault = createEventListener.preventDefault;
      }
      if (typeof eventListener.callback === 'function') {
        /* jshint validthis: true */
        eventListener.callback.call(this, e);
      } else if (eventListener.callback) {
        eventListener.callback.handleEvent(e);
      }
      if (eventListener.passive) {
        delete e.preventDefault;
      }
    }
    eventListener.type = type;
    eventListener.callback = callback;
    eventListener.capture = !!options.capture;
    eventListener.passive = !!options.passive;
    eventListener.once = !!options.once;
    // currently pointless but specs say to use it, so ...
    eventListener.removed = false;
    return eventListener;
  }
function createEventListener ( type , callback , options ) { function eventListener ( e ) { if ( eventListener . once ) { e . currentTarget . removeEventListener ( e . type , callback , eventListener ) ; eventListener . removed = true ; } if ( eventListener . passive ) { e . preventDefault = createEventListener . preventDefault ; } if ( typeof eventListener . callback === 'function' ) { /* jshint validthis: true */ eventListener . callback . call ( this , e ) ; } else if ( eventListener . callback ) { eventListener . callback . handleEvent ( e ) ; } if ( eventListener . passive ) { delete e . preventDefault ; } } eventListener . type = type ; eventListener . callback = callback ; eventListener . capture = ! ! options . capture ; eventListener . passive = ! ! options . passive ; eventListener . once = ! ! options . once ; // currently pointless but specs say to use it, so ... eventListener . removed = false ; return eventListener ; }
https://dom.spec.whatwg.org/#interface-eventtarget
https : // dom . spec . whatwg . org / #interface - eventtarget