PopStateEvent

PopStateEvent is an interface for the popstate event.

A popstate event is dispatched to the window every time the active history entry changes between two history entries for the same document. If the history entry being activated was created by a call to history.pushState() or was affected by a call to history.replaceState(), the popstate event's state property contains a copy of the history entry's state object.

Event PopStateEvent

Constructor

PopStateEvent()

Creates a new PopStateEvent object.

Instance properties

This interface also inherits the properties of its parent, Event.

PopStateEvent.state Read only

Returns a copy of the information that was provided to pushState() or replaceState().

Instance methods

This interface has no methods of its own, but inherits the methods of its parent, Event.

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet WebView Android
PopStateEvent 16 14 11 15 6 18 14 14 6 1.0 4.4
PopStateEvent 4 12 4 ≤12.1 6 18 4 ≤12.1 6 1.0 4.4
hasUAVisualTransition 118 118 No 104 18 118 No 79 18 25.0 118
state 4 12 4 ≤12.1 6 18 4 ≤12.1 6 1.0 4.4

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PopStateEvent