-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Nav thoughts
Do you think we can modify the $.mobile.navigate method to take its parameters as hash? Like, ( url, data, {/* options */} ), or ( { url: url, data: data, otherOption: otherOption, ... } )
The reason I ask is that I'm thinking that we could move a lot of the URL calculation into
For example we could move a lot of the url calculation code out of changePage and popup and dialog into this method, and we could make the parameters more flexible (which actually calls for having only one parameter - a hash): { back: true/false (false means forward), url: url, data: data } where the presence of the key "back" means we don't bother checking the url, but instead we either simply call $.mobile.back() or we do the history-disabled version of back, namely what dialog and popup currently do when history is disabled.
I think our ultimate goal should be to have our elements call this method in one of four ways:
- URL + deepLink
- [ URL + ]noDeepLink (url is optional if you just wanna add a dialogHashKey to the current URL, however, if you're loading a dialog via AJAX, it's not optional)
- Back
- Forward
Then, we can concentrate our navigation-when-history-is-disabled, stale-dialogHashKey-reuse, initial-url-has-dialogHashKey-corner-case and whatever else into this one place.