mixins/stateful.js

### Mixins

#### StatefulMixin
`module:stateful~StatefulMixin`

### Methods

#### inner stateful(target, defaultStateopt) → {Object}
`mixins/stateful.js`, `line 105`

  Applies StatefulMixin to a target object.

  If the target object is evented and has a `handleStateChanged` method, that method will be automatically bound to the `statechanged` event on itself.

  ##### Parameters:

  Name | Type | Attributes | 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:

  Object -

  Returns the `target`.