mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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: https://github.com/joyent/node/pull/25591
This commit is contained in:
1 parent
6b6bd21497
commit
8cbf7cb021
1 file changed
+1
-1
@@ -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!');
|
||||
|
||||
Reference in new issue
Block a user