- /**
- * onPopState(event,extra)
- * Refresh the Current State
- */
- onPopState = function(event,extra){
- // Prepare
- var stateId = false, newState = false, currentHash, currentState;
-
- // Reset the double check
- this.doubleCheckComplete();
-
- // Check for a Hash, and handle apporiatly
- currentHash = this.getHash();
- if ( currentHash ) {
- // Expand Hash
- currentState = this.extractState(currentHash||this.getLocationHref(),true);
- if ( currentState ) {
- // We were able to parse it, it must be a State!
- // Let's forward to replaceState
- //this.debug('this.onPopState: state anchor', currentHash, currentState);
- this.replaceState(currentState.data, currentState.title, currentState.url, false);
- }
- else {
- // Traditional Anchor
- //this.debug('this.onPopState: traditional anchor', currentHash);
- this.Adapter.trigger(window,'anchorchange');
- this.busy(false);
- }