TL;DR - Is there a way to listen to forward()
events of the history API?
I'm trying to handle navigation events in my application (to attach data for each route and support back & forward navigation).
I achieve this by saving the data in a stack object that aims to replicate the browser's history.
Currently, I use the history API to listen to onpopstate
events, and for any new browsing events.
Now I need to be able to differentiate between events fired due to forward vs. event that were just routed. Is that even possible? Do the browser export such an API?
Thanks!
Aucun commentaire:
Enregistrer un commentaire