Skip to content

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 CreateHtmlElementInfo

Properties

PropertyTypeDescription
attr?Record<string, boolean | null | number | string>The attributes to set; null removes the attribute.
cls?string | string[]The CSS class or classes.
parent?NodeThe parent to insert the element into.
prepend?booleanWhether to insert the element as the parent's first child instead of its last.
text?DocumentFragment | stringThe text content.
title?stringThe tooltip text.

Links to this page: