addEventListener(type:string, cb : () => void) {
    log.info('add event listener', type, cb)
    if(!(type in this.listeners)) {
      this.listeners[type] = []
    }
    this.listeners[type].push(cb)
  }
Add an event listener to given event type
@param {string} type Event type string
@param {(Event) => void} cb   Event handler function