[wp-trac] [WordPress Trac] #23262: Update Backbone.js to 0.9.10

WordPress Trac noreply at wordpress.org
Sun Mar 3 07:04:08 UTC 2013


#23262: Update Backbone.js to 0.9.10
--------------------------------+---------------------
 Reporter:  markjaquith         |       Owner:  nacin
     Type:  task (blessed)      |      Status:  closed
 Priority:  normal              |   Milestone:  3.6
Component:  External Libraries  |     Version:  3.5
 Severity:  normal              |  Resolution:  fixed
 Keywords:  needs-patch         |
--------------------------------+---------------------
Changes (by koopersmith):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"23589"]:
 {{{
 #!CommitTicketReference repository="" revision="23589"
 Update Backbone to 0.9.10. Update media to handle breaking changes.

 * When overriding `Backbone.sync()`, ensure the `sync` and `error` events
 fire consistently.

 * `Model#make()` has been removed. Use `$` instead, and be sure to grab
 the DOM node where necessary (using `[0]`).

 * `Collection#get()` now accepts `cid`s. `Collection#getByCid()` has been
 removed.

 * When overriding the `State` constructor, bind `change` callbacks after
 the default `Model` constructor is called, because the `Model` constructor
 no longer passes the `silent` flag when calling `set()` for the default
 attributes.

 * In 'change' events, `options.changes` was removed. It can now be
 accessed through `model.changed`. Check if any attributes have changed by
 calling `model.hasChanged()`. Also, don't mess with `model.changed`; it
 persists beyond the scope of a single event.

 * `options.index` is no longer be set in the `add` event callback. Use
 `collection.indexOf(model)` can be used to retrieve the index of a model
 instead.

 props gcorne. fixes #23262.
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23262#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list