I’ve got a simple event listener:
window.onhashchange = function(e){
alert(e.newURL);
}
that works great in anything but IE 9 (not testing for previous version). In IE I’m getting an undefined event object… Any idea what I’m missing? Is this not fully supported yet?
example here:
http://hupcapstudios.com/projects/hash.php#
Thanks in advance.
Some older versions of IE9 don’t pass the event as an argument to the event handler, you have to get it from
window.event, this should work: