tiledash.on
Runs `handler` with the tile’s `context`, `size`, `theme` or `render`: at once with what is there, then on every change. Returns a function that stops it.
Syntax
tiledash.on(event, handler)Arguments
eventRequired- One of `context`, `size`, `theme`, `render`.
handlerRequired- A function that gets the new value.
Example
tiledash.on('context', (context) => { tiledash.root.querySelector('.power').textContent = context.cap?.measure_power?.text ?? '';});