skip to content

Sync

Watches for prop changes and converts them into CSS custom property declarations. Can be used to effectively synchronize audio settings with the visual interface.

DRAFT! This element is in early development and is liable to change or possibly be replaced.

class
Sync
extends
Watch
tag
<sync-blam>
see

Props

name type default description
to string

The elements that should receive the custom properties. These elements and their child descendants will be subject to the values (where they're used).

event string

Not applicable.

from string

A selector to match all the elements to watch for attribute changes.

allowed string

A space-separated set of attribute names to watch over. If not set, all attributes are converted to CSS custom properties (when changed).

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 to element and starting over. Stops the DOM getting too unwieldy.

prop string null

Not applicable.

places number 1

For numeric data, the number of (fixed) decimal places. Set to 3, 1 will become 1.000.

bypass boolean false

Whether to stop responding to events as they happen.

chance boolean 1

The probability that the event will be responded to. From 0 to 1.

Examples

OH FUN! There are currently no examples using Sync.