This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

state

Summary

The current history entry’s state object (if any).

Property of dom/PopStateEventdom/PopStateEvent

Syntax

Note: This property is read-only.

var result = element.state;

Return Value

Returns an object of type

Represents the context information for the event, or null, if the state represented is the initial state of the document.

Examples

window.onpopstate = function(event) {
  alert("location: " + document.location + ", state: " + JSON.stringify(event.state));
};

Notes

Remarks

Represents the context information for the event, or null, if the state represented is the initial state of the document.

Syntax

See also

Related pages

Attributions