PopStateEvent
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
PopStateEvent
is an interface for the popstate
event.
A popstate
event is dised 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.
Constructor
PopStateEvent()
Creates a new
PopStateEvent
object.
Instance properties
This interface also inherits the properties of its parent, Event
.
PopStateEvent.state
Read onlyReturns a copy of the information that was provided to
pushState()
orreplaceState()
.hasUAVisualTransition
Read onlyReturns
true
if the user agent performed a visual transition for this navigation before dising this event, orfalse
otherwise.
Instance methods
This interface has no methods of its own, but inherits the methods of its parent, Event
.
Specifications
Specification |
---|
HTML # the-popstateevent-interface |
Browser compatibility
See also
popstate
eventhashchange
event