src/backbone.radio.js
function(name) {
    var args = _.toArray(arguments).slice(1);
    var results = eventsApi(this, 'request', name, args);
    if (results) {
      return results;
    }
    var channelName = this.channelName;
    var requests = this._requests;

    // Check if we should log the request, and if so, do it
    if (channelName && this._tunedIn) {
      Radio.log.apply(this, [channelName, name].concat(args));
    }

    // If the request isn't handled, log it in DEBUG mode and exit
    if (requests && (requests[name] || requests['default'])) {
      var handler = requests[name] || requests['default'];
      args = requests[name] ? args : arguments;
      return callHandler(handler.callback, handler.context, args);
    } else {
      Radio.debugLog('An unhandled request was fired', name, channelName);
    }
  }
function(name) {
    var args = _.toArray(arguments).slice(1);
    var results = eventsApi(this, 'request', name, args);
    if (results) {
      return results;
    }
    var channelName = this.channelName;
    var requests = this._requests;

    // Check if we should log the request, and if so, do it
    if (channelName && this._tunedIn) {
      Radio.log.apply(this, [channelName, name].concat(args));
    }

    // If the request isn't handled, log it in DEBUG mode and exit
    if (requests && (requests[name] || requests['default'])) {
      var handler = requests[name] || requests['default'];
      args = requests[name] ? args : arguments;
      return callHandler(handler.callback, handler.context, args);
    } else {
      Radio.debugLog('An unhandled request was fired', name, channelName);
    }
  }
function ( name ) { var args = _ . toArray ( arguments ) . slice ( 1 ) ; var results = eventsApi ( this , 'request' , name , args ) ; if ( results ) { return results ; } var channelName = this . channelName ; var requests = this . _requests ; // Check if we should log the request, and if so, do it if ( channelName && this . _tunedIn ) { Radio . log . apply ( this , [ channelName , name ] . concat ( args ) ) ; } // If the request isn't handled, log it in DEBUG mode and exit if ( requests && ( requests [ name ] || requests [ 'default' ] ) ) { var handler = requests [ name ] || requests [ 'default' ] ; args = requests [ name ] ? args : arguments ; return callHandler ( handler . callback , handler . context , args ) ; } else { Radio . debugLog ( 'An unhandled request was fired' , name , channelName ) ; } }
Make a request
Make a request