Module javafx.web

Class WebHistory

java.lang.Object
javafx.scene.web.WebHistory

public final class WebHistory extends Object
The WebHistory class represents a session history associated with a WebEngine instance. A single instance of WebHistory for a particular web engine can be obtained through the WebEngine.getHistory() method. The history is basically a list of entries. Each entry represents a visited page and it provides access to relevant page info, such as URL, title, and the date the page was last visited. Entries in the list are arranged in the order in which the corresponding pages were visited from oldest to newest. The list can be obtained by using the getEntries() method. The history and the corresponding list of entries change as WebEngine navigates across the web. The list may expand or shrink depending on browser actions. These changes can be listened to by the ObservableList API that the list exposes. The index of the history entry associated with the currently visited page is represented by the currentIndexProperty(). The current index can be used to navigate to any entry in the history by using the go(int) method. The maxSizeProperty() sets the maximum history size, which is the size of the history list.
Since:
JavaFX 2.2