src/util/event.js
// Register an event handler for the given event type.
Register an event handler for the given event type.
Register an event handler for the given event type .
on(type, handler) {
    let map = this._handlers || (this._handlers = {})
    let arr = map[type] || (map[type] = [])
    arr.push(handler)
  }
on ( type , handler ) { let map = this . _handlers || ( this . _handlers = { } ) let arr = map [ type ] || ( map [ type ] = [ ] ) arr . push ( handler ) }
Register an event handler for the given event type.
Register an event handler for the given event type .