Skip to content

Commit c6d7974

Browse files
bsteephensonjasnell
authored andcommitted
docs:events clarify emitter.listener() behavior
Clarifies that emitter.listener() returns a copy, not a reference Resolves issue nodejs#9022 Reviewed-By: James M Snell <[email protected]> PR-URL: nodejs/node-v0.x-archive#25591
1 parent d3407bc commit c6d7974

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/events.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Note that `emitter.setMaxListeners(n)` still has precedence over
122122

123123
### emitter.listeners(event)
124124

125-
Returns an array of listeners for the specified event.
125+
Returns a copy of the array of listeners for the specified event.
126126

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

0 commit comments

Comments
 (0)