Watch
Observes changes to HYERBLAM element attributes and logs those changes using the element’s HTML as a template. Data props are included using square bracket syntax ([[prop]]). The available props are name (the attribute name), oldValue (the previous attribute value), newValue (the new attribute value), id (the element id if present, or the nodeName), and time (the approximate currentTime the attribute changed).
DRAFT! This element is in early development and is liable to change or possibly be replaced.
- class
- Watch
- extends
- Template
- tag
<watch-blam>
Props
| name | type | default | description |
|---|---|---|---|
| allowed | string | A space-separated set of attribute names to watch over. If not set, all attributes trigger templating/appending. |
|
| event | string | not applicable |
|
| from | string | A selector to match all the elements to watch for attribute changes. Filtered to only include HYPERBLAM elements. |
|
| additive | boolean | false | Whether to log cumulatively or to just log the most recent data. |
| max | number | 16 | The number of times data is logged before clearing the |
| value | string | null | not applicable |
| prop | string | null | not applicable |
| to | string | null | The |
| bypass | boolean | false | Whether to stop responding to events as they happen. |
| chance | boolean | 1 | The probability that the |
Examples
Examples that use the Watch element: