// Instantiate history to use the address bar for state. var h = new goog.History(); goog.events.listen(h, goog.history.EventType.NAVIGATE, navCallback); h.setEnabled(true); // Any changes to the location hash will call the following function. function navCallback(e) { alert('Navigated to state "' + e.token + '"'); } // The history token can also be set from code directly. h.setToken('foo');
Whether the browser supports HTML5 history management's onhashchange event.
http://www.w3.org/TR/html5/history.html . IE 9 in compatibility mode
indicates that onhashchange is in window, but testing reveals the event
isn't actually fired.
Returns: boolean
Whether onhashchange is supported.
|
code » |
![]()
No description.
|
Code » |