Skip to content

EventEmitter.removeEventListener

Dragiyski edited this page Mar 28, 2015 · 2 revisions

Removes a specified listener function from an event.

Usage

emitter.removeEventListener(event, listener);

Synonyms

  • off
  • removeListener

Arguments

Argument Type Required Description
event string The name of the event.
listener function The listener function to be removed from event.

Return

The this EventEmitter instance.

Remarks

The listener is removed only in context of specified event. If the same listener is added by other events this is not affected.

No operation if the listener is not on current event or it is not a function.

The listener is also removed from dependency list of dependent listeners.

If any listeners are added for specified event solely as a dependency of removed listener, those listeners are also removed.

Clone this wiki locally