Add an event listener
@param {String} eventType
@param {Function} handler
779445
function (eventType, handler) {
		var fn = handler;
		// touch
		if (hasTouch && eventType === 'click') {
			eventType = 'touchstart';
			fn = function (e) {
				e.preventDefault();
				handler();
			};
		}
		// simplest possible event model for internal use
		this.element['on' + eventType] = fn;
		return this;
	}
443191
function addListener(eventType, fn){
  if (document.addEventListener) {
    document.addEventListener(eventType, fn, false);
  } else {
    document.attachEvent("on" + eventType, fn);
  }
}
180841
function (eventType, event, target) {

                if (!(event instanceof EventDispatcher.Event)) {
                    event = new EventDispatcher.Event(event);
                }

                if (!event.target) {
                    event.target = target || this;
                }

                event.type = eventType;


                if (!(this._eventHandlers[eventType] || this._eventHandlers["*"])) {
                    return event;
                }

                var list,
                    result, i;

                if (this._eventHandlers[eventType]) {

                    list = this._eventHandlers[eventType].slice();
                    for (i = 0; i < list.length; i++) {
                        if (list[i]) {
                            result = list[i].trigger(event, event.target);
                            if (result !== undefinedValue) {

                                if (result === false) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
                            }

                            if (event.isImmediatePropagationStopped) {
                                break;
                            }
                        }
                    }
                }

                if (this._eventHandlers["*"]) {

                    list = this._eventHandlers["*"].slice();
                    for (i = 0; i < list.length; i++) {
                        if (list[i]) {
                            result = list[i].trigger(event, target);
                            if (result !== undefinedValue) {

                                if (result === false) {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
                            }

                            if (event.isImmediatePropagationStopped) {
                                break;
                            }
                        }
                    }
                }

                return event;
            }
352321
function setupEvent(element, eType, handler, capture) {
  notifyOfNextSubs[eType] = [];
  subsIDs[eType] = {};
  element.addEventListener(
    eType,
    handler,
    passiveEventSupport
      ? {
          capture,
          // don't set click listener as passive because syntheticClick may call preventDefault
          passive: eType !== 'click',
        }
      : capture,
  );
}
1271778
function addGlobalHandler(eventType, handler, thisObject){
    var handlers = globalHandlers[eventType];
    if (handlers)
    {
      // search for similar handler, returns if found (prevent for handler dublicates)
      for (var i = 0, item; item = handlers[i]; i++)
        if (item.handler === handler && item.thisObject === thisObject)
          return;
    }
    else
    {
      if (noCaptureScheme)
        // nothing to do, but it will provide observeGlobalEvents calls if other one doesn't
        addHandler(document, eventType, $null);
      else
        document.addEventListener(eventType, observeGlobalEvents, true);

      handlers = globalHandlers[eventType] = [];
    }

    // add new handler
    handlers.push({
      handler: handler,
      thisObject: thisObject
    });
  }
268016
function( elem, type, event ) {
		if ( document.createEvent ) {
			event = document.createEvent("MouseEvents");
			event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
				0, 0, 0, 0, 0, false, false, false, false, 0, null);
			elem.dispatchEvent( event );

		} else if ( elem.fireEvent ) {
			elem.fireEvent("on"+type);
		}
	}
1216651
function addHandler(node, eventType, handler, thisObject){
    node = getNode(node);

    if (!node)
      throw 'basis.event.addHandler: can\'t attach event listener to undefined';

    if (typeof handler != 'function')
      throw 'basis.event.addHandler: handler is not a function';

    var handlers = node === global ? globalEvents : node[EVENT_HOLDER];

    if (!handlers)
      handlers = node[EVENT_HOLDER] = {};

    var eventTypeHandlers = handlers[eventType];
    var handlerObject = {
      handler: handler,
      thisObject: thisObject
    };

    if (!eventTypeHandlers)
    {
      eventTypeHandlers = handlers[eventType] = [handlerObject];
      eventTypeHandlers.fireEvent = function(event){ // closure
        // simulate capture phase for old browsers
        event = wrap(event);
        if (noCaptureScheme && event && globalHandlers[eventType])
        {
          if (typeof event.returnValue == 'undefined')
          {
            observeGlobalEvents(event);
            if (event.cancelBubble === true)
              return;
            if (typeof event.returnValue == 'undefined')
              event.returnValue = true;
          }
        }

        startFrame(event);

        // call eventType handlers
        for (var i = 0, wrappedEvent = new Event(event), item; item = eventTypeHandlers[i++];)
          item.handler.call(item.thisObject, wrappedEvent);

        finishFrame(event);
      };

      if (W3CSUPPORT)
        // W3C DOM event model
        node.addEventListener(eventType, eventTypeHandlers.fireEvent, false);
      else
        // old IE event model
        node.attachEvent('on' + eventType, eventTypeHandlers.fireEvent);
    }
    else
    {
      // check for duplicates, exit if found
      for (var i = 0, item; item = eventTypeHandlers[i]; i++)
        if (item.handler === handler && item.thisObject === thisObject)
          return;

      // add only unique handlers
      eventTypeHandlers.push(handlerObject);
    }
  }
829751
public Blade event(@NonNull EventType eventType, @NonNull EventListener eventListener) {
        this.eventManager.addEventListener(eventType, eventListener);
        return this;
    }
618507
public function addEventListener(string $eventClass, callable $handler):void
    {
        if (! isset($this->eventListenerMap[$eventClass])) {
            $this->eventListenerMap[$eventClass] = [];
        }
        $this->eventListenerMap[$eventClass][] = $handler;
    }
157004
function _addEventListener(eventName, xhr){
  xhr.addEventListener(eventName, function (event) {
    var listener = xhr["on" + eventName];

    if (listener && typeof listener == "function") {
      listener.call(event.target, event);
    }
  });
}
276351
def add_handler(self, message_type, handler):
        """"""
        if message_type not in self._handlers:
            self._handlers[message_type] = []

        if handler not in self._handlers[message_type]:
            self._handlers[message_type].append(handler)
331251
function(type, handler) {
      if (!this.listeners_)
        this.listeners_ = Object.create(null);
      if (!(type in this.listeners_)) {
        this.listeners_[type] = [handler];
      } else {
        var handlers = this.listeners_[type];
        if (handlers.indexOf(handler) < 0)
          handlers.push(handler);
      }
    }
249784
public void addEventType(String eventType)
    {
        if(this.eventTypes == null)
            this.eventTypes = new ArrayList<String>();
        this.eventTypes.add(eventType);
    }
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
        }
    }
206724
function (node, type, callback) {
      if (node.addEventListener) {
        node.addEventListener(type, function (e) {
          callback(e, e.target)
        }, false)
      } else if (node.attachEvent) {
        node.attachEvent('on' + type, function (e) {
          callback(e, e.srcElement)
        })
      }
    }
1374017
function addHandlers(node, handlers, thisObject){
    node = getNode(node);

    for (var eventType in handlers)
      addHandler(node, eventType, handlers[eventType], thisObject);
  }
996802
function (obj, type, handler, id) {

		switch (type) {
		case 'touchstart':
			return this.addPointerListenerStart(obj, type, handler, id);
		case 'touchend':
			return this.addPointerListenerEnd(obj, type, handler, id);
		case 'touchmove':
			return this.addPointerListenerMove(obj, type, handler, id);
		default:
			throw 'Unknown touch event type';
		}
	}