• Web APIs
  • PopStateEvent()
  • Instance properties
    1. History
    2. 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().

    hasUAVisualTransition Read only

    Returns true if the user agent performed a visual transition for this navigation before dispatching this event, or false 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

    BCD tables only load in the browser

    See also