I have this code:
window.history.pushState(newUrl, \"\", newUrl);
My question is, how to make sure that when doing pushState the browser ba
push is for pushing... adding
you should go for history.back()
history.back()
If you want to popState - emit popstate event on window or do history.replaceState()
popstate
history.replaceState()
If you want to cancell commented event: My answer will do the trick https://stackoverflow.com/a/44553087/5694206