@tempots/dom

renderWithContext() function

Renders the given renderable with the provided ctx DOM context.

Signature:

renderWithContext: (renderable: Renderable, ctx: DOMContext) => () => void

Parameters

Parameter

Type

Description

renderable

Renderable

The renderable node to be rendered.

ctx

DOMContext

The DOM context to be used for rendering.

Returns: () => void

A function that can be called to clear the rendered node.