W3cubDocs

/Web APIs

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 Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
PopStateEvent 16 14 11 No 15 6 4.4 18 14 14 6 1.0
PopStateEvent 4 12 4 10 ≤12.1 6 4.4 18 4 ≤12.1 6 1.0
hasUAVisualTransition 118 No No No 104 No 118 118 No No No No
state 4 12 4 10 ≤12.1 6 4.4 18 4 ≤12.1 6 1.0

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