You can detect if the browser supports the event by:
if ("onhashchange" in window) {
//...
}
See also:
- Detecting event support without browser sniffing
- Emulating
onhashchangewithout setInterval window.onhashchange
You can detect if the browser supports the event by:
if ("onhashchange" in window) {
//...
}
See also:
onhashchange without setIntervalwindow.onhashchange