Skip to main content

Module custom_data

Module custom_data 

Source
Expand description

Custom HTML host data for render commands.

Attach ExtraHTMLData as the extra_data type parameter on ElementConfig and render commands (Rectangle, Text, etc.). During drawing, OptionalExtraHTMLData::extra_html_data is read and passed to HTMLCanvas::ensure_command_element, which sets the DOM tag name and optional inline style on the cotis-{id} host element.

For arbitrary HTML fragments inside a host, use HTMLElement with custom draw logic or HTMLRenderer::get_custom_element_html.

Structs§

ExtraHTMLData
Per-command overrides for the DOM host element tag and inline CSS.
HTMLElement
Raw HTML content for a custom host element’s innerHTML.

Enums§

CustomHtmlElementTag
HTML tag name for a render command’s DOM host element (cotis-{id}).

Traits§

OptionalExtraHTMLData
Types that may carry ExtraHTMLData on a render command’s extra_data field.