createDivAsync
Creates a div asynchronously.
Import:
import { createDivAsync } from '@mnaoumov/typescript-lib/html-element';Signature:
function createDivAsync(o: string | CreateHtmlElementInfo | undefined, callback: ((element: HTMLDivElement) => Promisable<void>) | undefined): Promise<HTMLDivElement>Parameters:
| Parameter | Type | Description |
|---|---|---|
o |
string | CreateHtmlElementInfo | undefined | The element information. |
callback |
((element: HTMLDivElement) => Promisable<void>) | undefined | The callback to call when the div is created. |
Returns: Promise<HTMLDivElement> — A Promise that resolves to the div.