addEventListener<IEvent extends Event> method

EventListener<IEvent> addEventListener<IEvent extends Event>(
  1. EventType eventType,
  2. EventCallBack<IEvent> callBack
)

Implementation

EventListener<IEvent> addEventListener<IEvent extends Event>(
    EventType eventType, EventCallBack<IEvent> callBack) {
  var listener = EventListener(eventType, callBack);
  EventDispatcher.eventDispatcher.addListener(listener);
  return listener;
}