render
fun render(selector: String, override: Boolean = true, content: RenderContext.() -> Unit)
Content copied to clipboard
Creates a RenderContext for Tags and mounts it to a constant element in the static html file which id matches the selector.
Parameters
content
RenderContext for rendering the data to the DOM
override
if true all child elements are removed before rendering
selector
query selector of the element to mount to
fun render(targetElement: HTMLElement? = document.body, override: Boolean = true, content: RenderContext.() -> Unit)
Content copied to clipboard
Creates a RenderContext for Tags and mounts it to a targetElement.
Parameters
content
RenderContext for rendering the data to the DOM
override
if true all child elements are removed before rendering
targetElement
HTMLElement to mount to, default is document.body