v0.8.0
DEBUG warnings when overwriting callbacks
When you overwrite a Request or Command in debug mode you will now get a warning.
// Turn on debug mode
Backbone.Radio.DEBUG = true;
// Register a reply
Backbone.Radio.reply('myChannel', 'someReply', 2);
// Overriding it will send a warning to the console!
Backbone.Radio.reply('myChannel', 'someReply', 5);
stopReplying
and stopComplying
now support the second and third arguments
The big change here is that the removal methods are more powerful, as they now support the same arguments as off
. This gives you finer-grained control over the things that you unregister. You can, for instance, unregister by callback, or by context.
// Remove all callbacks with the context of 'this'
myChannel.stopComplying(undefined, undefined, this);