[wp-trac] [WordPress Trac] #26543: Backbone Routing doesn't support query arguments as parseable route components. WordPress uses them extensively, so it'd be worthwhile to support them in wp-backbone.js for ease of use.
WordPress Trac
noreply at wordpress.org
Sat Feb 22 02:21:29 UTC 2014
#26543: Backbone Routing doesn't support query arguments as parseable route
components. WordPress uses them extensively, so it'd be worthwhile to
support them in wp-backbone.js for ease of use.
-------------------------------------+------------------------------
Reporter: matveb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.8
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: javascript
-------------------------------------+------------------------------
Comment (by gcorne):
If we upgrade Backbone to 1.1.2, the patching of {{{Backbone.History}}} is
no longer necessary. See #27182
For future reference, if patching is needed it would be better to extend
{{{Backbone.History}}} to create a new {{{wp.Backbone.History}}}
constructor. And, then in places where we need our version use
{{{Backbone.history = new wp.Backbone.History()}}}, which would negate the
need for idioms like {{{originalFragment:
Backbone.History.prototype.getFragment}}}.
I also noticed that some of the {{{navigate()}}} calls should probably not
use {{{ replace: true}}} so that entries are added to the browser's
history so that the back button still works. The changes to how routing is
handled in THX probably should be a separate ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26543#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list