render

inline fun <T : Theme> render(theme: T, selector: String, override: Boolean = true, crossinline content: RenderContext.(T) -> Unit)

Creates a RenderContext for Tags and mounts it to a constant element in the static html file which id matches the selector. It also applies the given Theme

See also

Parameters

selector

query selector of the element to mount to

override

if true all child elements are removed before rendering

content

RenderContext for rendering the data to the DOM

Throws

inline fun <T : Theme> render(theme: T, targetElement: HTMLElement? = document.body, override: Boolean = true, crossinline content: RenderContext.(T) -> Unit)

Creates a render context for Tags and mounts it to an HTMLElement. It also applies the given Theme.

See also

Parameters

theme

Theme used in this RenderContext

targetElement

HTMLElement to mount to, default is document.body

override

if true all child elements are removed before rendering

content

RenderContext for rendering the data to the DOM

Throws