-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change #off to #removeListener #266
Change #off to #removeListener #266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is easy to miss, would you mind changing our .on()
s to .addListener()
so we aren't tempted to .off()
elsewhere?
Alternatively we could alias |
4bf7f3a
to
7ad841d
Compare
@rschamp I changed all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @paulkaplan!
Fixes #256
.on
is an alias for.addListener
[1], but there is no alias for.off
and it looks like there never will be [2] :( :( :([1] https://github.com/nodejs/node/blob/master/lib/events.js#L307
[2] nodejs/node#540