Adds the listener
function to the end of the list of listeners for the specified event
.
No checks are made to see if listener
has already been added. Multiple calls passing the
same combination of event
and listener
will result in the listener
being added, and
called, multiple times.
The name of the event.
The callback function.
Emits the event to all of its registered listeners.
The event to be emitted to its listeners.
The arguments to be passed along with the event.
false
if there were no listeners for the emitted event.
Removes all previously registered listeners for the specified event
.
The name of the event.
Removes the most recently added instance of listener
from the list of listeners for the
specified event
.
Once an event has been emitted, all listeners attached to it at the time of emitting will
be called in order. This implies that any removeListener
or removeAllListeners
calls
after emitting and before the last listener finishes execution will not remove them from
emit()
in progress. Subsequent events will behave as expected.
The name of the event.
The callback function to be removed.
A class used to receive and emit events.