It turns out that Safari creates an event.state element on page load without the need of javascript manually creating it. It’s creating a bit of a cross-browser compatibility issue. I was hoping to rectify this by finding the “direction” of the popstate.
So, when the user clicks the back button, I’m trying to see if there is an event direction variable I can work with to confirm that we are going either “backward” (back button) or “forward” (forward button).
I tried event.direction and getting undefined. Is there a way to get direction?
Cheers
Ryan