You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not crazy about energy().off(event, listener, quota?) having the optional quota. Without the documentation it's hard to know what it is. It only applies to the rare case of having the same listener listening to the same event more than once. I'd like to decide on the more useful behavior and remove the option, or maybe provide a separate function.
The text was updated successfully, but these errors were encountered:
ryanve
changed the title
Should .off(event, listener) remove all occurrences of listener?
.off(event, listener) behavior for multiple occurrences of listener
May 5, 2014
ryanve
changed the title
.off(event, listener) behavior for multiple occurrences of listener
.off(event, listener) behavior when listener occurs multiple times
May 5, 2014
ryanve
changed the title
.off(event, listener) behavior when listener occurs multiple times
.off(event, listener) for multiple listener occurences
May 5, 2014
ryanve
changed the title
.off(event, listener) for multiple listener occurences
.off(event, listener) multiple listener occurrence behavior
May 5, 2014
ryanve
changed the title
.off(event, listener) multiple listener occurrence behavior
Should .off(event, listener) remove all occurences
May 5, 2014
ryanve
changed the title
Should .off(event, listener) remove all occurences
Should .off(event, listener) remove all occurences?
May 5, 2014
One idea I had to handle this is to add .addListener and .removeListener that are fully compatible with EventEmitter where they're aliases for .on and .off. We could have .removeListener remove 1 and .off remove all. .addListener could be an alias for .on like in EventEmitter.
I'm not crazy about
energy().off(event, listener, quota?)
having the optional quota. Without the documentation it's hard to know what it is. It only applies to the rare case of having the same listener listening to the same event more than once. I'd like to decide on the more useful behavior and remove the option, or maybe provide a separate function.Node's
(new EventEmitter).off(event, listener)
removes only the most recent occuence. I was surprised to discover that. My guess was that it'd remove all occurences like howjQuery({}).off(event, listener)
does.The text was updated successfully, but these errors were encountered: