In javascript history api, I can do something like this
window.addEventListener('popstate', event => {
var data = event.state;
}, false);
but is there a way I can tell if the user clicked the back or forward button? Note: this is not about if they clicked one of the two, but its to distinguish which of the 2 they clicked on.
Thanks