Skip to content

Commit 8cbf7cb

Browse files
bsteephensonjasnell
authored andcommitted
docs:events clarify emitter.listener() behavior
Clarifies that emitter.listener() returns a copy, not a reference Resolves issue #9022 Reviewed-By: James M Snell <jasnell@gmail.com> PR-URL: nodejs/node-v0.x-archive#25591
1 parent 6b6bd21 commit 8cbf7cb

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
@@ -104,7 +104,7 @@ Note that `emitter.setMaxListeners(n)` still has precedence over
104104

105105
### emitter.listeners(event)
106106

107-
Returns an array of listeners for the specified event.
107+
Returns a copy of the array of listeners for the specified event.
108108

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

0 commit comments

Comments
 (0)