`addEventListener` combines DOM addEventListener with gc.pushEventListener
498331
function( target, type, listenerFunction ) {
            target.addEventListener( type, listenerFunction );
            pushEventListener( target, type, listenerFunction );
        }
107734
function _attachListener(object, type, callback) {
  if (object.addEventListener) {
    object.addEventListener(type, callback, false);
  } else {
    object.attachEvent('on' + type, callback);
  }
}
219917
def add_listener(event, &block)
      fail ArgumentError, 'must provide callback' unless block_given?
      listeners(event.to_sym).push block
    end
206495
function delegateListener (event, useCapture) {
        var fakeEvent = {},
            delegated = delegatedEvents[event.type],
            eventTarget = getActualElement(event.path
                                           ? event.path[0]
                                           : event.target),
            element = eventTarget;

        useCapture = useCapture? true: false;

        // duplicate the event so that currentTarget can be changed
        for (var prop in event) {
            fakeEvent[prop] = event[prop];
        }

        fakeEvent.originalEvent = event;
        fakeEvent.preventDefault = preventOriginalDefault;

        // climb up document tree looking for selector matches
        while (isElement(element)) {
            for (var i = 0; i < delegated.selectors.length; i++) {
                var selector = delegated.selectors[i],
                    context = delegated.contexts[i];

                if (matchesSelector(element, selector)
                    && nodeContains(context, eventTarget)
                    && nodeContains(context, element)) {

                    var listeners = delegated.listeners[i];

                    fakeEvent.currentTarget = element;

                    for (var j = 0; j < listeners.length; j++) {
                        if (listeners[j][1] === useCapture) {
                            listeners[j][0](fakeEvent);
                        }
                    }
                }
            }

            element = parentElement(element);
        }
    }
29887
function addEventListeners(target, types, handler) {
    each(splitStr(types), function(type) {
        target.addEventListener(type, handler, false);
    });
}
934401
function addHandler(element, type, handler) {
        if (element.addEventListener) {
            element.addEventListener(type, handler, false)
        } else if (element.attachEvent) {
            element.attachEvent("on" + type, handler)
        } else {
            element["on" + type] = handler
        }
    }
967506
function restoreEventListenerImplementation() {
    global.Element.prototype.addEventListener = nativeAddEventListener;
    global.Element.prototype.removeEventListener = nativeRemoveEventListener;
    global.document.addEventListener = nativeAddEventListener;
    global.document.removeEventListener = nativeRemoveEventListener;
  }
155716
function addEvent(obj, evt, func){
    var a;

    // Sensible browsers use `addEventListener`
    if((a = obj.addEventListener)){
      a.call(obj, evt, func, false);

    // IE uses `attachEvent`
    }else{
      obj.attachEvent('on' + evt, func);
    }
  }
562487
function addEventListener(type, listener, useCapture) {
      if (type === 'DOMContentLoaded') type = 'load';
      var target = this;
      var f = function(e) {
        e._timeStamp = Date.now();
        e._currentTarget = target;
        listener.call(this, e);
        e._currentTarget = null;
      };
      this['_' + type + listener] = f;
      this.attachEvent('on' + type, f);
    }
695994
function (element, events, func) {
            for (var i = 0; i < events.length; i++) {
                element.addEventListener(events[i], func);
            }
        }
318853
function addHookFn (proto, name) {
  proto[name] = function () {
    var args = [].splice.call(arguments, 0);

    var fn = args.splice(args.length - 1)[0];
    fn = _.isFunction(fn) ? fn : undefined;

    var options = {};
    if (_.isPlainObject(args[args.length - 1])) {
      options = args.splice(args.length - 1)[0];
    }

    var self = this;
    _.each(args, function(arg) {
      var event = util.format('%s.%s.%s.%s', name, self.name, self.version, arg);
      // remove old listeners if redefine is true
      if (options.redefine) {
        debug('Redefine hook', event);
        self.removeAllListeners(event);
      }
      self.on(event, fn);
    });
  };
}
207920
function WheelListener(elem, callback, useCapture) {
  var eventName = getEventName();

  if (eventName === 'wheel') {
    this._fun = callback;
    this._elem = elem;
    this._elem.addEventListener('wheel', this._fun, useCapture);
  } else if (eventName === 'mousewheel') {
    this._fun = fallbackHandler(callback);
    this._elem = elem;
    this._elem.addEventListener('mousewheel', this._fun, useCapture);
  } else {
    throw new Error('Browser does not support mouse wheel events');
  }
}
52479
function (root) {
        var current = root.prototype ? root.prototype.addEventListener : root.addEventListener;

        var customAddEventListener = function (name, func, capture) {
            // Branch when a PointerXXX is used
            if (supportedEventsNames.indexOf(name) !== -1) {
                setTouchAware(this, name, true);
            }

            if (current === undefined) {
                this.attachEvent('on' + getMouseEquivalentEventName(name), func);
            } else {
                current.call(this, name, func, capture);
            }
        };

        if (root.prototype) {
            root.prototype.addEventListener = customAddEventListener;
        } else {
            root.addEventListener = customAddEventListener;
        }
    }
1341375
function addListenerToEventMap(element, type, listener, useCapture, data) {
        var eventNameLowercase = type.toLowerCase();
        if (!element._eventsMap) {
            element._eventsMap = {};
        }
        if (!element._eventsMap[eventNameLowercase]) {
            element._eventsMap[eventNameLowercase] = [];
        }
        element._eventsMap[eventNameLowercase].push({
            listener: listener,
            useCapture: useCapture,
            data: data
        });
    }
333248
function(element)
	{
		mxEvent.addListener(element, 'contextmenu', function(evt)
		{
			if (evt.preventDefault)
			{
				evt.preventDefault();
			}
			
			return false;
		});
	}
528200
function addTypeListener(emitter, type, event, listener) {
    if (!emitter._listeners) {
        emitter._listeners = {
            on: {},
            after: {},
            before: {}
        };
    }

    if (!emitter._listeners[type][event]) {
        emitter._listeners[type][event] = [];
    }
    if ('on' == type && emitter._listeners[type][event].length) {
        throw Error('Listener for event "' + event + '" already defined.');
    }

    emitter._listeners[type][event].push(listener);

    return function remove() {
        const index = emitter._listeners[type][event].indexOf(listener);
        if (-1 !== index) {
            emitter._listeners[type][event].splice(index, 1);
        }
    };
}
517313
function(el, type, func) {
      if(el.addEventListener) {
        el.addEventListener(type, func, false);
      } else if(el.attachEvent){ 
        el.attachEvent('on' + type, func);
      } else{ 
        el['on' + type] = func; 
      }  
    }