Is there a way to detect in "popstate" event if the user has clicked the back button or the forward button ?
window.addEventListener("popstate", (e) => {
// detect back or forward
});
Is there a way to detect in "popstate" event if the user has clicked the back button or the forward button ?
window.addEventListener("popstate", (e) => {
// detect back or forward
});