src/eventhandling.js
function (eventName, handler) {
    if (typeof(eventName) !== 'string') {
      throw new Error('Argument eventName should be a string');
    }
    if (typeof(handler) !== 'function') {
      throw new Error('Argument handler should be a function');
    }
    log('[Eventhandling] Adding event listener', eventName);
    this._validateEvent(eventName);
    this._handlers[eventName].push(handler);
  }
function (eventName, handler) {
    if (typeof(eventName) !== 'string') {
      throw new Error('Argument eventName should be a string');
    }
    if (typeof(handler) !== 'function') {
      throw new Error('Argument handler should be a function');
    }
    log('[Eventhandling] Adding event listener', eventName);
    this._validateEvent(eventName);
    this._handlers[eventName].push(handler);
  }
function ( eventName , handler ) { if ( typeof ( eventName ) !== 'string' ) { throw new Error ( 'Argument eventName should be a string' ) ; } if ( typeof ( handler ) !== 'function' ) { throw new Error ( 'Argument handler should be a function' ) ; } log ( '[Eventhandling] Adding event listener' , eventName ) ; this . _validateEvent ( eventName ) ; this . _handlers [ eventName ] . push ( handler ) ; }
Install an event handler for the given event name
Install an event handler for the given event name