Methods
dispatch
- dispatch(event, ...data): boolean
Parameters
event: string
Rest
...data: any
Returns boolean
- Whether the dispatching is successful
eventNames
- eventNames(): string[]
Returns string[]
所有事件名
hasEvent
- hasEvent(event): boolean
Returns boolean
返回是否存在相应的事件
listenerCount
- listenerCount(event): number
Returns number
The count of listeners
off
- off(event, fn?): EventDispatcher
Parameters
event: string
Optional
fn: Function
removeAllEventListeners
- removeAllEventListeners(event?): void
Returns void
事件派发管理