[wp-trac] [WordPress Trac] #26799: Update to Backbone.js 1.1.0
WordPress Trac
noreply at wordpress.org
Tue Jan 14 16:11:43 UTC 2014
#26799: Update to Backbone.js 1.1.0
--------------------------------+------------------------------
Reporter: ericlewis | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version:
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------------+------------------------------
Changes (by gcorne):
* keywords: => has-patch
Comment:
I took a look at this and was able to put together an initial patch.
For reference, here are the [http://backbonejs.org/#changelog changes]
between 1.0 and 1.1:
* 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.
* 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.
* 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.
* Many tweaks, optimizations and bugfixes relating to Backbone 1.0,
including URL overrides, mutation of options, bulk ordering, trailing
slashes, edge-case listener leaks, nested model parsing…
The attachment:26799-02.patch (the two earlier patches were false starts)
includes:
* Upgrades Backbone to 1.1 and Underscore to 1.5.2
* Switches to un-minified versions of both for development. (It would be
nice if we could do this for all of the third-party libraries even if it
means coming up with some sort of constant that is used when running from
a checkout of develop.svn.wordpress.org to minimize the impact on package
size)
* Adjustments needed to deal with issues that arose due to the first two
items in the above change log.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26799#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list