• Create an element with a class and optional attributes.

    Type Parameters

    • K extends keyof HTMLElementTagNameMap

    Parameters

    • doc: Document
    • tag: K
    • OptionalclassName: string
    • Optionalattrs: Record<string, string>

    Returns HTMLElementTagNameMap[K]