|Static Public Summary|
Provides older "extend" functionality for Backbone.
Backbone.sync - Persists models to the server.
import extend from 'backbone-es6/src/extend.js'
Provides older "extend" functionality for Backbone. While it is still accessible it is recommended to adopt the new Backbone-ES6 patterns and ES6 sub-classing via "extends".
Helper function to correctly set up the prototype chain for subclasses. Similar to
goog.inherits, but uses a hash
of prototype properties and class properties to be extended.
Subclass of parent class.
public sync(method: string, model: Model | Collection, options: object): XMLHttpRequest source
import sync from 'backbone-es6/src/sync.js'
Backbone.sync - Persists models to the server. (http://backbonejs.org/#Sync)
Override this function to change the manner in which Backbone persists models to the server. You will be passed the
type of request, and the model in question. By default, makes a RESTful Ajax request to the model's
possible customizations could be:
setTimeout to batch rapid-fire updates into a single request.
Send up the models as XML instead of JSON.
Persist models via WebSockets instead of Ajax.
Backbone.emulateHTTP in order to send
DELETE requests as
POST, with a
containing the true HTTP method, as well as all requests with the body as
application/json with the model in a param named
model. Useful when interfacing with server-side
languages like PHP that make it difficult to read the body of