@tempots/dom

render() function

Renders a Renderable node into a specified parent element or selector.

Signature:

render: (node: Renderable, parent: Node | string, { doc, clear }?: RenderOptions) => () => void

Parameters

Parameter

Type

Description

node

Renderable

The Renderable node to render.

parent

Node | string

The parent element or selector where the node should be rendered.

{ doc, clear }

RenderOptions

(Optional)

Returns: () => void

The result of rendering the Renderable node.

Exceptions

Throws a RenderingError if the parent element cannot be found by the provided selector.