Returns the listener associated with the given component and event.

@param component The component.
@param eventName The event name.
@return A DeferredEventListener, or null if not found.
348034
public static ActionListener getListener(BaseComponent component, String eventName) {
        return (ActionListener) component.getAttribute(ActionListener.getAttrName(eventName));
    }
777308
function on(eventDomain, listenerElement = 'local') {

	if(!eventDomain){
		throw new Error('Please pass an event type e.g "click"');
	}

	return ({ constructor }, method, { value }) => {

		let Class = constructor;

		initCoreMap(storage, Class);
		initOnMap(storage, Class);

		let mapClassOn = storage.get(Class);
		let handler = value;
		let eventsMap = mapClassOn.get('@on').get('events');

		if(listenerElement === 'local'){
			eventsMap.get('local').push([
				eventDomain, handler
			]);
		} else {
			eventsMap.get('context').push([
				eventDomain, [ handler, listenerElement ]
			]);
		}

		/**
		 * ### Ensure "registerCallback('created', ..." (see below) registered only once ###
		 * This function will called every time if an event will be registered e.g. over @on('click .foo')
		 * but registerOnCreatedCallback can only call once because we want only Create
		 * one Eventhandler
		 */
		if(mapClassOn.get('@on').get('callbacksDefined')){
			return;
		}

		mapClassOn.get('@callbacks').get('created').push(domNode => {

			// register local (domNode) events e.g. thats depends on element click mousemove, etc
			let eventsLocal = mapClassOn.get('@on').get('events').get('local');
			if(eventsLocal.length){
				let eventHandler = on.helper.createLocalEventHandler(eventsLocal, domNode);
				namespace.create(domNode, '$eventHandler.local', eventHandler);
			}

			// register custom events e.g. thats depend on e.g. window onresize, onwheel, etc
			let eventsContext = mapClassOn.get('@on').get('events').get('context');
			if(eventsContext.length){
				on.helper.createCustomEventHandler(eventsContext, domNode, (eventHandler, name) => {
					namespace.create(domNode, `$eventHandler.${name}`, eventHandler);
				});
			}

		});

		mapClassOn.get('@callbacks').get('attached').push(domNode => {

			// this behavior ensures that when the domNode is
			// attached, detached, attached
			let eventHandlerLength = 0;
			let $eventHandler = Object.values(domNode.$eventHandler);
			$eventHandler.forEach(eventHandler => {
				if(eventHandler.initialized()){
                    eventHandlerLength++
				}
			});

			if(eventHandlerLength === $eventHandler.length){
				return;
			}

			Object.entries(domNode.$eventHandler).forEach(([name, eventHandler]) => {

				/**
				 * Using the same instance is 30% faster in
				 * (Chrome, Opera) and no difference in Firefox
				 * @see: https://jsperf.com/new-class-vs-singleton
				 */
				eventHandler.reinit({
					events:  mapClassOn.get('@on').get('events').get(name),
					element: domNode,
					bind: domNode,
				});
			});

		});

		mapClassOn.get('@callbacks').get('detached').push(domNode => {

			Object.values(domNode.$eventHandler).forEach(eventHandler => {
				eventHandler.destroy();
			});
		});

		mapClassOn.get('@on').set('callbacksDefined', true);

	}
}
232477
function getEventObject(eventObjects, eventType, listener) {
        var i, numberOfEvents = eventObjects.length;

        for (i = 0; i < numberOfEvents; i += 1) {
            if (isValueEqualToValue(eventObjects[i].type, eventType) &&
                    isValueEqualToValue(eventObjects[i].callback, listener)) {
                return eventObjects[i];
            }
        }

        return null;
    }
639465
public function addListener(string $eventName, $listener) : void
    {
        $this->dispatcher->addListener($eventName, $listener);
    }
331246
function addEventListener(el, eventName, handler) {
    removeEventListener(el, eventName, handler);

    if (window.jQuery) {
      $(el).on(eventName, handler);
    } else if (el.addEventListener) {
      el.addEventListener(eventName, handler);
    } else {
      el.attachEvent('on' + eventName, function () {
        handler.call(el);
      });
    }
  }
117643
protected function getListeners($eventName)
    {
        if (isset($this->listeners[$eventName])) {
            return $this->listeners[$eventName];
        }
        return null;
    }
1211379
function (eventName) {
        var event = { type: eventName, target: this },
            handlerList = this._eventHandlers && this._eventHandlers[eventName],
            i;

        if (!handlerList) {
            return;
        }

        // Use a clone of the list in case handlers call on()/off() while we're still in the loop
        handlerList = handlerList.slice();

        // Pass 'event' object followed by any additional args trigger() was given
        var applyArgs = Array.prototype.slice.call(arguments, 1);
        applyArgs.unshift(event);

        for (i = 0; i < handlerList.length; i++) {
            try {
                // Call one handler
                handlerList[i].handler.apply(null, applyArgs);
            } catch (err) {
                console.error("Exception in '" + eventName + "' listener on", this, String(err), err.stack);
                console.assert();  // causes dev tools to pause, just like an uncaught exception
            }
        }
    }
104953
function (element, name, methodName, key, method) {
/*Line 11 - 'AtomComponent.js' */                if (element == null)
/*Line 12 - 'AtomComponent.js' */                    return;
/*Line 13 - 'AtomComponent.js' */                if (typeof methodName == 'function') {
/*Line 14 - 'AtomComponent.js' */                    method = methodName;
/*Line 15 - 'AtomComponent.js' */                }
/*Line 16 - 'AtomComponent.js' */                method = method || AtomUI.createDelegate(this, methodName);
/*Line 17 - 'AtomComponent.js' */                var be = {
/*Line 18 - 'AtomComponent.js' */                    element: element,
/*Line 19 - 'AtomComponent.js' */                    name: name,
/*Line 20 - 'AtomComponent.js' */                    methodName: methodName,
/*Line 21 - 'AtomComponent.js' */                    handler: method
/*Line 22 - 'AtomComponent.js' */                };
/*Line 23 - 'AtomComponent.js' */                if (key) {
/*Line 24 - 'AtomComponent.js' */                    be.key = key;
/*Line 25 - 'AtomComponent.js' */                }
/*Line 26 - 'AtomComponent.js' */                if (AtomUI.isNode(element)) {
/*Line 27 - 'AtomComponent.js' */                    $(element).bind(name, null, method);
/*Line 28 - 'AtomComponent.js' */                } else {
/*Line 29 - 'AtomComponent.js' */                    if (element.addEventListener) {
/*Line 30 - 'AtomComponent.js' */                        element.addEventListener(name, method, false);
/*Line 31 - 'AtomComponent.js' */                    } else {
/*Line 32 - 'AtomComponent.js' */                        var f = element["add_" + name];
/*Line 33 - 'AtomComponent.js' */                        if (f == null) {
/*Line 34 - 'AtomComponent.js' */                            // try atom binder...
/*Line 35 - 'AtomComponent.js' */                            f = AtomBinder["add_" + name];
/*Line 36 - 'AtomComponent.js' */                            if (key) {
/*Line 37 - 'AtomComponent.js' */                                f.apply(AtomBinder, [element, key, method]);
/*Line 38 - 'AtomComponent.js' */                            }
/*Line 39 - 'AtomComponent.js' */                            else {
/*Line 40 - 'AtomComponent.js' */                                f.apply(AtomBinder, [element, method]);
/*Line 41 - 'AtomComponent.js' */                            }
/*Line 42 - 'AtomComponent.js' */                        } else {
/*Line 43 - 'AtomComponent.js' */                            f.apply(element, [method]);
/*Line 44 - 'AtomComponent.js' */                        }
/*Line 45 - 'AtomComponent.js' */                    }
/*Line 46 - 'AtomComponent.js' */                }
/*Line 47 - 'AtomComponent.js' */                this._eventHandlers.push(be);
/*Line 48 - 'AtomComponent.js' */            }
1321757
@Override
    public void subscribeRemoteEvent(String eventName, boolean subscribe) {
        String channelName = EventUtil.getChannelName(eventName);
        
        if (subscribe) {
            consumer.subscribe(channelName, this);
        } else {
            consumer.unsubscribe(channelName, this);
        }
    }
1051756
function getEventListener(eventExpr, owner, data, isComponentEvent) {
    return function (e) {
        var method = findMethod(owner, eventExpr.name, data);

        if (typeof method === 'function') {
            method.apply(owner, evalArgs(
                eventExpr.args,
                new Data(
                    { $event: isComponentEvent ? e : e || window.event },
                    data
                ),
                owner
            ));
        }
    };
}
1235138
public function getListeners(string $eventName) : array
    {
        if (!isset($this->events[$eventName])) {
            return [];
        }

        return $this->events[$eventName];
    }
537314
public final void addComponent(ComponentRenderer component)
    {
        renderers.add(component);
        services.add(component);
        if (component instanceof HandlerListener)
        {
            addListener((HandlerListener) component);
        }
    }
1247722
protected function listen(string $event, string $methodName, int $priority = 0): EventListener
    {
        return new EventListener($event, [$this, $methodName], $priority);
    }
142190
function(event, name) {

            var eventListeners = this.__getEventListeners(event);

            if (!(name in eventListeners)) {
                throw new Error('Event listener for event "' + event + '" with name "' + name + '" does not exist!');
            }

            return eventListeners[event][name];
        }
156757
public List<SystemEventListener> getListenersForEventClass(Class<? extends SystemEvent> facesEventClass) {

        if (null == listener) {
            List<SystemEventListener> list = new ArrayList<SystemEventListener>(1);
            list.add(context.getExceptionHandler());
            listener = Collections.unmodifiableList(list);
        }
        return listener;

    }
551647
@Override
	public void subscribeToEvent(EventListener eventListener, Class<? extends AbstractTaskEvent> eventType) {
		this.eventHandler.subscribeToEvent(eventListener, eventType);
	}
393962
public Map<String, List<VariableListener<?>>> getVariableListeners(String eventName, boolean includeCustomListeners) {
    Map<String, Map<String, List<VariableListener<?>>>> listenerCache;
    if (includeCustomListeners) {
      if (resolvedVariableListeners == null) {
        resolvedVariableListeners = new HashMap<String, Map<String,List<VariableListener<?>>>>();
      }

      listenerCache = resolvedVariableListeners;
    } else {
      if (resolvedBuiltInVariableListeners == null) {
        resolvedBuiltInVariableListeners = new HashMap<String, Map<String,List<VariableListener<?>>>>();
      }
      listenerCache = resolvedBuiltInVariableListeners;
    }

    Map<String, List<VariableListener<?>>> resolvedListenersForEvent = listenerCache.get(eventName);

    if (resolvedListenersForEvent == null) {
      resolvedListenersForEvent = new HashMap<String, List<VariableListener<?>>>();
      listenerCache.put(eventName, resolvedListenersForEvent);

      CmmnActivity currentActivity = this;

      while (currentActivity != null) {
        List<VariableListener<?>> localListeners = null;
        if (includeCustomListeners) {
          localListeners = currentActivity.getVariableListenersLocal(eventName);
        } else {
          localListeners = currentActivity.getBuiltInVariableListenersLocal(eventName);
        }

        if (localListeners != null && !localListeners.isEmpty()) {
          resolvedListenersForEvent.put(currentActivity.getId(), localListeners);
        }

        currentActivity = currentActivity.getParent();
      }
    }

    return resolvedListenersForEvent;
  }