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