render

fun render(selector: String, override: Boolean = true, content: RenderContext.() -> Unit)

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

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


fun render(targetElement: HTMLElement? = document.body, override: Boolean = true, content: RenderContext.() -> Unit)

Creates a RenderContext for Tags and mounts it to a targetElement.

Parameters

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