Listener class represents a single event listener object. Such objects keep all relevant
contextual information such as the event being listened to, the object the listener was attached
to, the callback function and so on.
Creates a new
new Listener(event, target, callback, [options])
|The event being listened to|
|EventEmitter~callback||The function to call when the listener is triggered|
|[||Object||target||The context to invoke the listener in (a.k.a. the value of |
|[||number||Infinity||The remaining number of times after which the callback should automatically be removed.|
|[||array||An array of arguments that will be passed separately to the callback function upon execution. The array is stored in the |
TypeError: The `event` parameter must be a string or `EventEmitter.ANY_EVENT`.
ReferenceError: The `target` parameter is mandatory.
TypeError: The `callback` must be a function.
An array of arguments to pass to the callback function upon execution.
The callback function to execute.
The context to execute the callback function in (a.k.a. the value of
this inside the
The number of times the listener function was executed.
The event name.
The remaining number of times after which the callback should automatically be removed.
Whether this listener is currently suspended or not.
The object that the event is attached to (or that emitted the event).
Removes the listener from its target.