@tempots/dom

DOMContext.makeChildElement() method

Creates a new DOM element (eg: HTML or SVG) with the specified tag name and namespace and appends it to the current element.

Signature:

makeChildElement(tagName: string, namespace: string | undefined): DOMContext;

Parameters

Parameter

Type

Description

tagName

string

The tag name of the element to create.

namespace

string | undefined

The namespace URI to create the element in, or undefined to create a standard HTML element.

Returns: DOMContext

The newly created element.