Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.36 KB

index.md

File metadata and controls

47 lines (30 loc) · 1.36 KB
title slug page-type browser-compat
PopStateEvent
Web/API/PopStateEvent
web-api-interface
api.PopStateEvent

{{APIRef("History API")}}

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.

{{InheritanceDiagram}}

Constructor

  • {{domxref("PopStateEvent.PopStateEvent", "PopStateEvent()")}}
    • : Creates a new PopStateEvent object.

Instance properties

This interface also inherits the properties of its parent, {{domxref("Event")}}.

  • {{domxref("PopStateEvent.state")}} {{ReadOnlyInline}}
    • : 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, {{domxref("Event")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also