@tempots/dom

OnCtx() function

Returns a renderable function that executes the given function with the current DOMContext as argument.

Signature:

OnCtx: (fn: (ctx: DOMContext) => Clear) => Renderable

Parameters

Parameter

Type

Description

fn

(ctx: DOMContext) => Clear

The function to be executed with the DOMContext argument.

Returns: Renderable

A Clear function that can be used to clean up any resources associated with the execution.