Function hasAttrib

  • Checks whether an element has an attribute.

    Parameters

    • elem: Element

      Element to check.

    • name: string

      Attribute name to look for.

    Returns boolean

    Returns whether elem has the attribute name.