public class JsHistory extends JsElementalMixinBase implements History
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsHistory() |
Modifier and Type | Method and Description |
---|---|
void |
back()
Goes to the previous page in session history, the same action as when the user clicks the browser's Back button.
|
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) . |
int |
getLength()
Read-only.
|
Object |
getState()
Returns the state at the top of the history stack.
|
void |
go(int distance)
Loads a page from the session history, identified by its relative location to the current page, for example
-1 for the previous page or 1 for the next page. |
void |
pushState(Object data,
String title)
Pushes the given data onto the session history stack with the specified title and, if provided, URL.
|
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.
|
void |
replaceState(Object data,
String title)
Updates the most recent entry on the history stack to have the specified data, title, and, if provided, URL.
|
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.
|
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
intAt, length
numberAt
public final int getLength()
History
1
.public final Object getState()
History
popstate
event. Read only.public final void back()
History
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)
.
public final void forward()
History
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)
.
public final void go(int distance)
History
-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).public final void pushState(Object data, String title)
History
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.
public final void pushState(Object data, String title, String url)
History
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.
public final void replaceState(Object data, String title)
History
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.
replaceState
in interface History
public final void replaceState(Object data, String title, String url)
History
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.
replaceState
in interface History
Copyright © 2016. All rights reserved.