Type Alias AttributeNameForElement<E>

AttributeNameForElement: E extends HTMLElement
    ? Extract<keyof HTMLElementAttributes<E>, string>
    : E extends SVGElement
        ? Extract<keyof SVGElementAttributes, string>
        : E extends Element ? Extract<keyof AllAttributes, string> : never

Valid attribute names for the element of type E.

Type Parameters

  • E extends Element

    Element with corresponding attribute names.