Function hasAttrib

  • hasAttrib(elem: Element, name: string): boolean
  • Checks whether an element has an attribute.

    Returns

    Returns whether elem has the attribute name.

    Parameters

    • elem: Element

      Element to check.

    • name: string

      Attribute name to look for.

    Returns boolean