- createDiv<T extends keyof HTMLElementTagNameMap = "div">(
__namedParameters: {
addToBody?: boolean;
classList?: string[];
elementTag?: T;
id?: string;
innerHTML?: string;
},
): HTMLElementTagNameMap[T] Type Parameters
- T extends keyof HTMLElementTagNameMap = "div"
Parameters
- __namedParameters: {
addToBody?: boolean;
classList?: string[];
elementTag?: T;
id?: string;
innerHTML?: string;
}
Returns HTMLElementTagNameMap[T]
Creates an HTML div element.