new EventEmitter()
Methods
-
off(type, fn)
-
Remove a callback handler for an event type.
Parameters:
Name Type Description typeString fnfunction -
on(type, fn)
-
Assign a callback handler to an event type.
Parameters:
Name Type Description typeString fnfunction -
trigger(event)
-
Dispatch an event to be handled by any assigned callbacks.
Parameters:
Name Type Description eventEvent