PageStateManager

page/state/PageStateManager~ PageStateManager

Manager of the current page state and state history.

Constructor

new PageStateManager()

Source:

Methods

clear()

Source:
Clears the state history.

getAllStates() → {Array.<Object.<string, *>>}

Source:
Returns the recorded history of page states. The states will be chronologically sorted from the oldest to the newest. Note that the implementation may limit the size of the recorded history, therefore the complete history may not be available.
Returns:
The recorded history of page states.
Type
Array.<Object.<string, *>>

getState() → {Object.<string, *>}

Source:
Returns the current page state.
Returns:
The current page state.
Type
Object.<string, *>

setState(statePatch)

Source:
Sets a new page state by applying the provided patch to the current state.
Parameters:
Name Type Description
statePatch Object.<string, *> The patch of the current state.