Name
PopStateEvent — history transition event
Inherits from
Event
Synopsis
Web applications that manage their own history (see History Management) use the pushState() method of History to create a new entry in the browsing
history and associate a state value or object with it. When the user
uses the browser’s Back or Forward buttons to navigate between those
saved states, the browser triggers a popstate event on the Window
object and passes a copy of the saved application state in the
associated PopStateEvent object.
Properties
readonly anystateThis property holds a copy of the state value or object that was passed to the
History.pushState()orHistory.replaceState()method. Thestatecan be any value that can be cloned with the structured clone algorithm (see Structured Clones).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access