CreateHtmlElementInfo
The element information createElAsync and its siblings apply: the element-type-agnostic subset of Obsidian’s DomElementInfo, declared here so this module needs no Obsidian typings. An Obsidian DomElementInfo value is assignable to it.
Import:
import type { CreateHtmlElementInfo } from '@mnaoumov/typescript-lib/html-element';Signature:
export interface CreateHtmlElementInfoProperties
| Property | Type | Description |
|---|---|---|
| attr? | Record<string, boolean | null | number | string> | The attributes to set; null removes the attribute. |
| cls? | string | string[] | The CSS class or classes. |
| parent? | Node | The parent to insert the element into. |
| prepend? | boolean | Whether to insert the element as the parent's first child instead of its last. |
| text? | DocumentFragment | string | The text content. |
| title? | string | The tooltip text. |
Links to this page: