class type t =Inheritsobject
..end
method addStateEvents : 'a. 'a Js.t -> unit Js.meth
Add events that will trigger the state to be saved. If the first argument is an array, each element of that array is the name of a state event. Otherwise, each argument passed to this method is the name of a state event.
Parameters:
_ Js.t
The event name or an array of event names.
method applyState : 'b. 'b Js.t -> unit Js.meth
Applies the state to the object. This should be overridden in subclasses to do more complex state operations. By default it applies the state properties onto the current object.
Parameters:
_ Js.t
The state
method destroy : unit Js.meth
Destroys this stateful object.
method getState : 'c. 'c Js.t Js.meth
Gets the current state of the object. By default this function returns null, it should be overridden in subclasses to implement methods for getting the state.
Returns:
_ Js.t
The current state
method savePropToState : 'd.
Js.js_string Js.t ->
'd Js.t -> Js.js_string Js.t Js.optdef -> bool Js.t Js.meth
Conditionally saves a single property from this object to the given state object. The idea is to only save state which has changed from the initial state so that current software settings do not override future software settings. Only those values that are user-changed state should be saved.
Parameters:
Js.js_string Js.t
The name of the property to save.
_ Js.t
The state object in to which to save the property.
Js.js_string Js.t
(optional)
The name to use for the property in state.
Returns:
bool Js.t
True if the property was saved, false if not.
method savePropsToState : 'e 'f 'g. 'e Js.t -> 'f Js.t -> 'g Js.t Js.meth
Gathers additional named properties of the instance and adds their current values to the passed state object.
Parameters:
_ Js.t
The name (or array of names) of the property to save.
_ Js.t
The state object in to which to save the property values.
Returns:
_ Js.t
state
method saveState : unit Js.meth
Saves the state of the object to the persistence store.