# Emitters
Classes, Handlers, and Managers which has an event category extends an Emitter, which recieves, listens, and emits events.
Emitters have three methods: on , once , and emit.
# Methods
# on( event , callback )
Listens to the event.
PARAMETER | TYPE | OPTIONAL | DESCRIPTION |
---|---|---|---|
event | String (opens new window) | ⨯ | The event to listen to. |
callback | Function (opens new window) | ⨯ | The function when the event is fired. |
# once( event , callback )
Listens to the evnt once.
PARAMETER | TYPE | OPTIONAL | DESCRIPTION |
---|---|---|---|
event | String (opens new window) | ⨯ | The event to listen to. |
callback | Function (opens new window) | ⨯ | The function when the event is fired. |
# emit( event , ...arguments )
Emits an event.
PARAMETER | TYPE | OPTIONAL | DESCRIPTION |
---|---|---|---|
event | String (opens new window) | ⨯ | The event to emit. |
...arguments | Arguments (opens new window) | ✓ | The arguments to pass to the function callback. |