mixins/stateful.js
Methods
-
innerstateful(target, defaultState){Object}
-
Applies
StatefulMixin
to a target object.If the target object is
evented
and has ahandleStateChanged
method, that method will be automatically bound to thestatechanged
event on itself.Name Type Description target
Object The object to be made stateful.
defaultState
Object optional A default set of properties to populate the newly-stateful object's
state
property.Returns:
Type Description Object Returns the target
.