History API
PopStateEvent is an interface for the Window/popstate_event 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.
Constructor
- PopStateEvent.PopStateEvent
- : Creates a new
PopStateEventobject.
- : Creates a new
Instance properties
This interface also inherits the properties of its parent, Event.
- PopStateEvent.state
- : Returns a copy of the information that was provided to
pushState()orreplaceState().
- : Returns a copy of the information that was provided to
- PopStateEvent.hasUAVisualTransition
- : Returns
trueif the user agent performed a visual transition for this navigation before dispatching this event, orfalseotherwise.
- : Returns
Instance methods
This interface has no methods of its own, but inherits the methods of its parent, Event.
Specifications
Browser compatibility
See also
popstateeventhashchangeevent
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
