Type Alias ElementLike<TN>

ElementLike:
    | ElementOf<TN>
    | Document
    | Element
    | EventTarget
    | HTMLElement
    | SVGElement
    | Node
    | ChildNode
    | ParentNode

Element or EventTarget that can be passed into functions.

The difference between a native Element and this is an Element is the base class for HTMLElement and SVGElement, whereas an ElementLike could represent a HTMLElement, a SVGElement, the Document, or the element representation of an EventTarget.

Type Parameters

  • TN extends TagName = "*"

    Tag name of Element.