I have code.
window.addEventListener('popstate', function (e) {
// The URL changed...
console.log(e);
});
setInterval(() => {
history.pushState(null, "Other page", \`/${Math.ceil(Math.random() * 200)}\`)
}, 1000);
So, it changes the url of page every second to not same. But I do not get the event object in console. Why?