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