History Interface
History
object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
Methods
Code void back() #
Goes to the previous page in session history, the same action as when the user clicks the browser's Back button. Equivalent to history.go(-1)
.
void back();
Code void forward() #
Goes to the next page in session history, the same action as when the user clicks the browser's Forward button; this is equivalent to history.go(1)
.
void forward();
Code void go(int distance) #
-1
for the previous page or 1
for the next page. When integerDelta
is out of bounds (e.g. -1 when there are no previously visited pages in the session history), the method doesn't do anything and doesn't raise an exception. Calling go()
without parameters or with a non-integer argument has no effect (unlike Internet Explorer, which supports string URLs as the argument).
void go(int distance);
Code void pushState(Object data, String title, [String url]) #
Pushes the given data onto the session history stack with the specified title and, if provided, URL. The data is treated as opaque by the DOM; you may specify any JavaScript object that can be serialized. Note that Firefox currently ignores the title parameter; for more information, see manipulating the browser history.
void pushState(Object data, String title, [String url]);
Code void replaceState(Object data, String title, [String url]) #
Updates the most recent entry on the history stack to have the specified data, title, and, if provided, URL. The data is treated as opaque by the DOM; you may specify any JavaScript object that can be serialized. Note that Firefox currently ignores the title parameter; for more information, see manipulating the browser history.
void replaceState(Object data, String title, [String url]);
Fields
Code final int length #
1
.
final int length;
Code final state #
popstate
event. Read only.
final Dynamic state;
This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.