// Initialise History
- init : function(options){
+ init : function(options)
+ {
+
+ var emptyFunction = function(){};
+
+
- initialTitle : window.document.title,
+ this.initialTitle = window.document.title;
this.store = {};
this.idToState={};
this.stateToId={};
if ( this.emulated.pushState ) {
// Prepare
- var emptyFunction = function(){};
+
this.pushState = emptyFunction;
this.replaceState = emptyFunction;
}
this.store = {};
}
- }
+ } else {
+ this.onUnload = emptyFunction;
+ }
+
+
this.normalizeStore();
/**
* Clear Intervals on exit to prevent memory leaks
*/
- History.Adapter.bind(window,"unload",History.clearAllIntervals);
+ this.Adapter.bind(window,"unload",this.clearAllIntervals);
/**
* Create the initial State
*/
- History.saveState(History.storeState(History.extractState(History.getLocationHref(),true)));
+ this.saveState(this.storeState(this.extractState(this.getLocationHref(),true)));