@tempots/dom

DOMContext.of() method

Creates a new DOMContext instance for the given Element and optional reference Node.

Signature:

static of(element: Element, ref?: Node | undefined): DOMContext;

Parameters

Parameter

Type

Description

element

Element

The Element to create the DOMContext for.

ref

Node | undefined

(Optional) An optional reference Node to associate with the DOMContext.

Returns: DOMContext

A new DOMContext instance.