Created
April 13, 2014 04:08
-
-
Save sunnyluthra/10568795 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//To support android stock browser | |
/** | |
@private | |
Pushes a new state | |
@method pushState | |
@param path {String} | |
*/ | |
pushState: function(path) { | |
var state = { path: path }; | |
get(this, 'history').pushState(state, null, path); | |
// store state if browser doesn't support `history.state` | |
if (!supportsHistoryState) { | |
this._historyState = state; | |
} else { | |
} | |
// used for webkit workaround | |
this._previousURL = this.getURL(); | |
}, | |
/** | |
@private | |
Replaces the current state | |
@method replaceState | |
@param path {String} | |
*/ | |
replaceState: function(path) { | |
var state = { path: path }; | |
get(this, 'history').replaceState(state, null, path); | |
// store state if browser doesn't support `history.state` | |
if (!supportsHistoryState) { | |
this._historyState = state; | |
} else { | |
} | |
// used for webkit workaround | |
this._previousURL = this.getURL(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment