I'm facing a strange issue where where popstate returns null, regardless, even if pushState has fired seven or eight times.
window.addEventListener('popstate', function(event) {
console.log(event.state);
});
I have also tried:
window.onpopstate = function(event) {
console.log(event.state);
};
But no luck. I'm using Chrome.