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

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs/node-v0.x-archive#25591
  • Loading branch information
bsteephenson authored and jasnell committed Aug 4, 2015
1 parent d3407bc commit c6d7974
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 @@ -122,7 +122,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 c6d7974

Please sign in to comment.