Skip to content

assertElement

assertElement(value, message?): asserts value is HTMLElement

Defined in: core/dom/elements.ts:13

Throws unless value is an element.

unknown

What to check.

string

The message of the error. Say what the element is for.

asserts value is HTMLElement

If value is null, undefined, or anything that is not an element.

assertElement(element, 'The carousel element must be an HTMLElement.');