loading... Pacem JS

PacemDataElement is the core element to stand on for data observing.
Its most important property is model. Lean on it to orchestrate your ViewModel.

Plain properties

Basic "flat" properties are easily made observable (i.e. bindable).
Remember, as a best practice, to

use a PacemDataElement and its model property as the most reliable observable: it will always be guaranteed to emit a propertychange event.

Example:

Nested properties

Nested properties don't always notify their change, they do if a two-way binding is set between the PacemDataElement and the data modifiers.
This is typical in a form scenario.

Example:

Persisted data

Property persistAs lets the model of a PacemDataElement to persist in the localStorage.
Re-entering a page having persisted data permits to have resumed the last registered changes.

Example:

Debounce and throttle

Property change notifications can be debounced and throttled, in order to mitigate - for instance - eccessive DOM changes.
Here are the propeties: