PageStateManager 

Manager of the current page state and state history.

Kind: global class


pageStateManager.clear() 

Clears the state history.

Kind: instance method of PageStateManager


pageStateManager.setState(statePatch) 

Sets a new page state by applying the provided patch to the current state.

Kind: instance method of PageStateManager

Param Type Description
statePatch Object.<string, \*> The patch of the current state.

pageStateManager.getState() ⇒ Object.<string, \*> 

Returns the current page state.

Kind: instance method of PageStateManager
Returns: Object.<string, \*> - The current page state.


pageStateManager.getAllStates() ⇒ Array.<Object.<string, \*>> 

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.

Kind: instance method of PageStateManager
Returns: Array.<Object.<string, \*>> - The recorded history of page states.


pageStateManager.getTransactionStatePatches() ⇒ Array.<Object.<string, \*>> 

Returns queueing state patches off the main state from the begin of transaction.

Kind: instance method of PageStateManager
Returns: Array.<Object.<string, \*>> - State patches from the begin of transaction.


pageStateManager.beginTransaction() 

Starts queueing state patches off the main state. While the transaction is active every {@method setState} call has no effect on the current state.

Note that call to {@method getState} after the transaction has begun will return state as it was before the transaction.

Kind: instance method of PageStateManager


pageStateManager.commitTransaction() 

Applies queued state patches to the main state. All patches are squashed and applied with one {@method setState} call.

Kind: instance method of PageStateManager


pageStateManager.cancelTransaction() 

Cancels ongoing transaction. Uncommited state changes are lost.

Kind: instance method of PageStateManager