Function
Static Public Summary | ||
public | Adds an event event listener to the replay update event. | |
public | Adds an event listener to the state change event. | |
public | Adds an event listener to the storage update event. | |
public | Clears the state storage | |
public | createStateError(message: *): {"type": *, "message": *} | |
public | createStorageError(message: *): {"type": *, "message": *} | |
public | dispatchReplayUpdateEventListener(update: Object) Replay update event dispatcher | |
public | dispatchStateChangeEvent(state: String) State change event dispatcher. | |
public | dispatchStorageUpdateEvent(update: Object) Storage update event dispatcher. | |
public | Gets the state from localstorage | |
public | setStateReady(force: Boolean): * Sets the state to ready. | |
public | setStateRecord(force: Boolean): Promise Set state safely to record. | |
public | setStateReplay(force: Boolean): Promise Set state safely to replay. | |
public | True if state is Ready | |
public | True if state is Record | |
public | True if state is Replay | |
public | Tracks down element according to trail. | |
public | Creates a trail according to its ancestors and siblings recursively. |
Static Public
public addReplayUpdateEventListener(func: function) source
import {addReplayUpdateEventListener} from 'domreplay/js/domreplay/dispatcher.js'
Adds an event event listener to the replay update event.
Params:
Name | Type | Attribute | Description |
func | function | the function to be called when the event has been dispatched. |
public addStateChangeEventListener(func: function) source
import {addStateChangeEventListener} from 'domreplay/js/domreplay/dispatcher.js'
Adds an event listener to the state change event.
Params:
Name | Type | Attribute | Description |
func | function | the function to be called when the event has been dispached. |
public addStorageUpdateEventListener(func: function) source
import {addStorageUpdateEventListener} from 'domreplay/js/domreplay/dispatcher.js'
Adds an event listener to the storage update event.
Params:
Name | Type | Attribute | Description |
func | function | the function to be called when the event has been dispatched. |
public clearStateStorage() source
import {clearStateStorage} from 'domreplay/js/domreplay/state.js'
Clears the state storage
public createStateError(message: *): {"type": *, "message": *} source
import {createStateError} from 'domreplay/js/domreplay/error.js'
Params:
Name | Type | Attribute | Description |
message | * |
Return:
{"type": *, "message": *} |
public createStorageError(message: *): {"type": *, "message": *} source
import {createStorageError} from 'domreplay/js/domreplay/error.js'
Params:
Name | Type | Attribute | Description |
message | * |
Return:
{"type": *, "message": *} |
public dispatchReplayUpdateEventListener(update: Object) source
import {dispatchReplayUpdateEventListener} from 'domreplay/js/domreplay/dispatcher.js'
Replay update event dispatcher
Params:
Name | Type | Attribute | Description |
update | Object | object with update information |
public dispatchStateChangeEvent(state: String) source
import {dispatchStateChangeEvent} from 'domreplay/js/domreplay/dispatcher.js'
State change event dispatcher.
Params:
Name | Type | Attribute | Description |
state | String | the current state. |
public dispatchStorageUpdateEvent(update: Object) source
import {dispatchStorageUpdateEvent} from 'domreplay/js/domreplay/dispatcher.js'
Storage update event dispatcher.
Params:
Name | Type | Attribute | Description |
update | Object | object with update information. |
public getState(): String source
import {getState} from 'domreplay/js/domreplay/state.js'
Gets the state from localstorage
Return:
String | current state |
public setStateReady(force: Boolean): * source
import {setStateReady} from 'domreplay/js/domreplay/state.js'
Sets the state to ready. Resolves when state has changed It will reject whenever the current state is not ready.
Params:
Name | Type | Attribute | Description |
force | Boolean | no safe |
Return:
* |
public setStateRecord(force: Boolean): Promise source
import {setStateRecord} from 'domreplay/js/domreplay/state.js'
Set state safely to record. Resolves when the state has changed. It will reject whenever the current state is not ready.
Params:
Name | Type | Attribute | Description |
force | Boolean | no safe |
Return:
Promise | Returns a Promise. |
public setStateReplay(force: Boolean): Promise source
import {setStateReplay} from 'domreplay/js/domreplay/state.js'
Set state safely to replay. Resolves when the state has changed. It will reject whenever the current state is not ready.
Params:
Name | Type | Attribute | Description |
force | Boolean | no safe |
Return:
Promise | Returns a Promise. |
public stateIsReady(): Boolean source
import {stateIsReady} from 'domreplay/js/domreplay/state.js'
True if state is Ready
Return:
Boolean | True if state is Ready |
public stateIsRecord(): Boolean source
import {stateIsRecord} from 'domreplay/js/domreplay/state.js'
True if state is Record
Return:
Boolean | True if state is Record |
public stateIsReplay(): Boolean source
import {stateIsReplay} from 'domreplay/js/domreplay/state.js'
True if state is Replay
Return:
Boolean | True if state is Replay |
public tracker(trail: *): Promise<HTMLElement>|Promise<null> source
import {tracker} from 'domreplay/js/domreplay/domhound/tracker.js'
Tracks down element according to trail.
Params:
Name | Type | Attribute | Description |
trail | * |
Return:
Promise<HTMLElement>|Promise<null> |