diff options
author | Forrest L Norvell <forrest@npmjs.com> | 2014-04-28 12:38:06 -0700 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-04-29 14:15:10 +0400 |
commit | 793c76e5c65031009525fcb6e5e4af78c28d1c4f (patch) | |
tree | 8cf4fc2643c617bda32eeb704272d36a1aee373d | |
parent | 3f3a71e61e90d45293704f21c98bc0ea53bb09ff (diff) | |
download | node-793c76e5c65031009525fcb6e5e4af78c28d1c4f.tar.gz |
docs: add cautionary note to emitter.removeAllListeners
Signed-off-by: Fedor Indutny <fedor@indutny.com>
-rw-r--r-- | doc/api/events.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/events.markdown b/doc/api/events.markdown index 77d0418e2..07c5b0e2b 100644 --- a/doc/api/events.markdown +++ b/doc/api/events.markdown @@ -69,7 +69,9 @@ Returns emitter, so calls can be chained. ### emitter.removeAllListeners([event]) -Removes all listeners, or those of the specified event. +Removes all listeners, or those of the specified event. It's not a good idea to +remove listeners that were added elsewhere in the code, especially when it's on +an emitter that you didn't create (e.g. sockets or file streams). Returns emitter, so calls can be chained. |