on(eventName, handler) {
    // TODO: throw error if type of handler is not a function
    this.eventListeners[eventName] = handler;
  }
Attach an event handler function for event name
@param  {String} eventName 
@param  {Function} handler   
@return {void}