Function getAttributeValue

  • getAttributeValue(elem: Element, name: string): string | undefined
  • Gets an attribute from an element.

    Returns

    The element's attribute value, or undefined.

    Parameters

    • elem: Element

      Element to check.

    • name: string

      Attribute name to retrieve.

    Returns string | undefined