skip to content

Log

Listens to events and uses the element’s HTML as a template for appending event data to an elected element. Data props are included using square bracket syntax like [[prop]].

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

class
Log
extends
Template
tag
<log-blam>
see

Props

name type default description
mode string “events”

By default, the element listens for events and templates event data. All data includes name (of the attribute/prop or event type), id (the id or a selector representing the invoking element), and target (the invoking element itself). For a mode of “props”, the value and oldValue are also available.

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.

places number 1

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

to string null

A selector for the element to which templated data will be appended. If not set (null), it defaults to the Template-based element itself.

for string “blam any”

By default, ListenWatch-based elements listen for blam events and any prop/attribute changes.

from string

A CSS selector representing all elements from which events will be listened to. If not set, the node array defaults to the element’s defaultFrom function’s return value.

prop string null

The property (which may be a method or map to an audioParam) to affect at the event.

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 Log.