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 #9022

Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node-v0.x-archive#25591
  • Loading branch information
bsteephenson authored and jasnell committed Aug 4, 2015
1 parent 6b6bd21 commit 8cbf7cb
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 8cbf7cb

Please sign in to comment.