backbone.radio
Advanced tools
Changelog
Breaking change: Space-separated requests no longer return an Array. Instead, an Object is returned.
// old
myChannel.request('thingOne thingTwo');
// => [replyOne, replyTwo]
// new
myChannel.request('thingOne thingTwo');
// => { thingOne: replyOne, thingTwo: replyTwo }
New feature: Radio.reset()
is now a top-level API method that can be used to reset a channel, or all channels. Do note that channels continue to have their own reset
method.
New feature: Radio.debugLog()
is now exposed...go forth and customize how Radio logs potential errors!
Changelog
This update is not backwards compatible.
Feature: channelName
is now a public property on each Channel.
Feature: Requests and Commands can now have "default"
handlers which will be called when the specified event isn't registered.
API Change: The convenience connectX methods have been removed. In their place, the object syntax can be used for registering multiple events on channels. This makes the API of Radio more consistent with Backbone.Events. For instance,
myChannel.reply({
oneRequest: myCallback,
anotherRequest: myCallback
}, myContext);