devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

hashchange event wont trigger in IE9 #103

Open ottendennis opened 7 years ago

ottendennis commented 7 years ago

history.zip

When i click the "item" button in IE9, i expect the hashListener to be executed. I think it's caused by L445 Removing this line fixes the problem, but i guess it's required for something else ;)

<a href="#item">Item</a>

<script> var hashListener = function () { console.log('hash change!'); }; window.addEventListener('hashchange', hashListener); </script>