Backbone.noConflict

Backbone.noConflictvar backbone = Backbone.noConflict(); Returns the Backbone object back to its original value. You can use the return value of Backbone.noConflict() to keep a local reference to Backbone. Useful for embedding Backbone on third-party websites, where you don't want to clobber the existing Backbone. var localBackbone = Backbone.noConflict(); var model = localBackbone.Model.extend(...);

Backbone.listenToOnce

listenToOnceobject.listenToOnce(other, event, callback) Just like listenTo, but causes the bound callback to fire only once before being removed.

Backbone.listenTo

listenToobject.listenTo(other, event, callback) Tell an object to listen to a particular event on an other object. The advantage of using this form, instead of other.on(event, callback, object), is that listenTo allows the object to keep track of the events, and they can be removed all at once later on. The callback will always be called with object as context. view.listenTo(model, 'change', view.render);

Backbone.history

Backbone.history.start

startBackbone.history.start([options]) When all of your Routers have been created, and all of the routes are set up properly, call Backbone.history.start() to begin monitoring hashchange events, and dispatching routes. Subsequent calls to Backbone.history.start() will throw an error, and Backbone.History.started is a boolean value indicating whether it has already been called. To indicate that you'd like to use HTML5 pushState support in your application, use Backbone.history.start({pushSta

Backbone.emulateHTTP

emulateHTTPBackbone.emulateHTTP = true If you want to work with a legacy web server that doesn't support Backbone's default REST/HTTP approach, you may choose to turn on Backbone.emulateHTTP. Setting this option will fake PUT, PATCH and DELETE requests with a HTTP POST, setting the X-HTTP-Method-Override header with the true method. If emulateJSON is also on, the true method will be passed as an additional _method parameter. Backbone.emulateHTTP = true; model.save(); // POST to "/collecti

Backbone.emulateJSON

emulateJSONBackbone.emulateJSON = true If you're working with a legacy web server that can't handle requests encoded as application/json, setting Backbone.emulateJSON = true; will cause the JSON to be serialized under a model parameter, and the request to be made with a application/x-www-form-urlencoded MIME type, as if from an HTML form.

Backbone.$

Backbone.$Backbone.$ = $; If you have multiple copies of jQuery on the page, or simply want to tell Backbone to use a particular object as its DOM / Ajax library, this is the property for you. Backbone.$ = require('jquery');

Backbone.ajax

ajaxBackbone.ajax = function(request) { ... }; If you want to use a custom AJAX function, or your endpoint doesn't support the jQuery.ajax API and you need to tweak things, you can do so by setting Backbone.ajax.

all event

"all" â this special event fires for any triggered event, passing the event name as the first argument followed by all trigger arguments.