History
Overview
History is a class in Aspose.Html FOSS for Python.
In-memory session history for a Window.
This class provides 6 methods for working with History objects in Python programs.
Available methods include: __init__, back, forward, go, push_state, replace_state.
All public members are accessible to any Python application after installing the Aspose.Html FOSS for Python package.
Properties: length, scroll_restoration, state.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
length | int | Read | Gets the length. |
state | object | None | Read | Gets the state. |
scroll_restoration | str | Read/Write | Gets or sets the scroll restoration. |
Methods
| Signature | Description |
|---|---|
__init__(window: "Window") | Calls init(window) on this History instance. |
push_state(state: object, title: str, url: str | None) | Push a new session-history entry. |
replace_state(state: object, title: str, url: str | None) | Replace the current session-history entry. |
go(delta: int) | Move by delta in session history and dispatch popstate on traversal. |
back() | Equivalent to go(-1). |
forward() | Equivalent to go(1). |