- createEl<T extends keyof HTMLElementTagNameMap>(
type: T,
attrs: Attrs,
parent?: Element,
): HTMLElementTagNameMap[T] Type Parameters
- T extends keyof HTMLElementTagNameMap
Parameters
- type: T
- attrs: Attrs
Optional
parent: Element
Returns HTMLElementTagNameMap[T]
Create an HTML element of the given type