Browse Source

doc: document value of `this` inside listeners

Fixes #5326.
v0.10.5-release
Sean Silva 12 years ago
committed by Ben Noordhuis
parent
commit
63466e5cae
  1. 4
      doc/api/events.markdown

4
doc/api/events.markdown

@ -13,7 +13,9 @@ Typically, event names are represented by a camel-cased string, however,
there aren't any strict restrictions on that, as any string will be accepted.
Functions can then be attached to objects, to be executed when an event
is emitted. These functions are called _listeners_.
is emitted. These functions are called _listeners_. Inside a listener
function, `this` refers to the `EventEmitter` that the listener was
attached to.
## Class: events.EventEmitter

Loading…
Cancel
Save