- h<K extends keyof HTMLElementTagNameMap>(
doc: Document,
tag: K,
className?: string,
attrs?: Record<string, string>,
): HTMLElementTagNameMap[K] Type Parameters
- K extends keyof HTMLElementTagNameMap
Parameters
- doc: Document
- tag: K
OptionalclassName: stringOptionalattrs: Record<string, string>
Returns HTMLElementTagNameMap[K]
Create an element with a class and optional attributes.