stack

Home > @infiniteobjects/core-library-web > Assert > isElement

Assert.isElement() method

Checks if the given input is a HTMLElement. You can use Generic types to assert an specific Element Type

Signature:

static isElement<E extends HTMLElement>(elem: E | null): elem is E;

Parameters

Parameter Type Description
elem E | null  

Returns:

elem is E

Remarks

No actual check for the type assertion is done