json-dom
    Preparing search index...

    Function elementHasAttribute

    • Check if the provided Element has the provided attributes. Returns a boolean, or an array of 1 / 0 / -1 based on the comparison status.

      Parameters

      • element: HTMLElement | null | undefined

        Receive the element to be assessed

      • key: string

        The attribute name to search for

      • attr: unknown

        The expected value of the attribute to compare against

      Returns AttributeComparison