[wp-trac] [WordPress Trac] #26799: Update to Backbone.js 1.1.0

WordPress Trac noreply at wordpress.org
Thu Feb 13 07:33:31 UTC 2014


#26799: Update to Backbone.js 1.1.0
--------------------------------+------------------
 Reporter:  ericlewis           |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  3.9
Component:  External Libraries  |     Version:
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:
--------------------------------+------------------

Comment (by nacin):

 In [changeset:"27170"]:
 {{{
 #!CommitTicketReference repository="" revision="27170"
 Update Backbone from 1.0 to 1.1.

 Also update Underscore to 1.6. Includes the development versions of both,
 which are not included in the build.

 Here is Backbone's changelog:
  * Made the return values of Collection’s `set`, `add`, `remove`, and
 `reset` more useful. Instead of returning `this`, they now return the
 changed (added, removed or updated) model or list of
 models. (This means they can no longer be chained.)
  * Backbone Views no longer automatically attach options passed to the
 constructor as `this.options` and Backbone Models no longer attach `url`
 and `urlRoot` options, but you can do it yourself if you prefer. (But if
 you extend `wp.Backbone.View`, options will be attached for you.)
  * All `"invalid"` events now pass consistent arguments. First the model
 in question, then the error object, then options.
  * You are no longer permitted to change the id of your model during
 `parse`. Use `idAttribute` instead.
  * On the other hand, `parse` is now an excellent place to extract and
 vivify incoming nested JSON into associated submodels.

 See [27171] (next commit) for changes made to WordPress to be compatible
 with Backbone 1.1.

 props gcorne, georgestephanis.
 see #26799.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/26799#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list