Skip to content

tiledash.root

The tile as the template draws it, with the widget’s style: find your elements here, not in `document`. An element with `data-script` is yours: the template drawing again leaves it and what you put in it alone. The `hd-*` components that draw from the tile’s values work here, each loaded the first time the tile has one (`customElements.whenDefined` waits for it); `hd-chart` and `hd-history` draw when the widget may read `history`; sparklines, maps, cameras, pictures, floor plans and 3D show an empty box.

Syntax

tiledash.root

Example

// Template: <div class="chart" data-script></div>const chart = tiledash.root.querySelector('.chart');