-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Create "off" as an alias for "removeEventListener" #5352
Comments
Similar suggestions have been made in the past. However, the events module is frozen (and events.EventEmitter in particular), no further methods or properties will be added. |
Oh, I searched for this problem, but couldn't found a related issue. Sorry for that. |
Additions when the API is frozen are - in theory - possible but EventEmitter is a special case. Since everyone and his dog inherits from it, adding a new property means everything all of a sudden grows a new property. The 'domain' property in v0.8 was painful enough for some to not want to repeat that. |
Thank you for your answers. If this should ever be considered again, it would be great. I really would like to hear some arguments from people who do not want this addition. (Expect the argument you said.) Funny side note: There is a whole Node module which has only one purpose - create a tiny polyfill for off. Not that I would install a complete module for a one-liner :) |
But I would (if I ever need |
I'm glad I could help! |
Hi *,
Just a small feature request: Since
on
is an alias foraddEventListener
it would be handy and more consistent ifremoveEventListener
hadoff
as an alias.(At least I tried
off
first.)The text was updated successfully, but these errors were encountered: