Skip to content

Commit

Permalink
docs:events clarify emitter.listener() behavior
Browse files Browse the repository at this point in the history
Clarifies that emitter.listener() returns a copy, not a reference
Resolves issue nodejs#9022
  • Loading branch information
bsteephenson authored and jasnell committed Jun 29, 2015
1 parent 69b9c10 commit 8018ccf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/events.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Note that `emitter.setMaxListeners(n)` still has precedence over

### emitter.listeners(event)

Returns an array of listeners for the specified event.
Returns a copy of the array of listeners for the specified event.

server.on('connection', function (stream) {
console.log('someone connected!');
Expand Down

0 comments on commit 8018ccf

Please sign in to comment.