Created
February 5, 2015 02:24
-
-
Save gilbox/6ca6d850fe7bc9199cfe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handlePathChange() { | |
actionCreator.handlePathChange({newPath:location.pathname + location.search}); | |
} | |
// setup event listener for back/forward buttons | |
var eventInfo = window.addEventListener ? ['addEventListener', ''] : ['attachEvent', 'on']; | |
window[eventInfo[0]](eventInfo[1] + 'popstate', handlePathChange, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment