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