examples/todos/js/backbonefire.js
function(cb) {
        var method = cb ? 'on' : 'off';
        this[method]('change', function(model) {
          var newModel = this._updateModel(model);
          if(_.isFunction(cb)){
            cb.call(this, newModel);
          }
        }, this);
      }
function(cb) {
        var method = cb ? 'on' : 'off';
        this[method]('change', function(model) {
          var newModel = this._updateModel(model);
          if(_.isFunction(cb)){
            cb.call(this, newModel);
          }
        }, this);
      }
function ( cb ) { var method = cb ? 'on' : 'off' ; this [ method ] ( 'change' , function ( model ) { var newModel = this . _updateModel ( model ) ; if ( _ . isFunction ( cb ) ) { cb . call ( this , newModel ) ; } } , this ) ; }
Determine if the model will update for every local change.
Provide a callback function to call events after the update.
Determine if the model will update for every local change . Provide a callback function to call events after the update .