@laserware/dominator
    Preparing search index...

    Function isElementType

    • Checks if the target matches the specified tagName. If the target doesn't exist or is invalid, returns false.

      Type Parameters

      • E extends Element

        Element representation of specified target.

      Parameters

      • target: null | Target

        Element, EventTarget, or CSS selector.

      • tagName: string

        Tag name to check for (e.g. div, span, etc.).

      Returns target is E

      true if the target is of type tagName.

      You can't UPPERCASE the tagName without getting a type error. That's because this function converts it to lowercase before checking.