dispatchEvent(type:string,event:Event) {
    log.info('dispatch event', event)
    if(!(type in this.listeners))
      return
    let handlers = this.listeners[type]
    for(let i in handlers) {
      handlers[i].call(this, event)
    }

  }
Dispatch an event
@param {string} type Event type.
@param {Event} event Event data payload.