DomElementInfo
Unofficial
Options object passed to createEl.
Signature:
export interface DomElementInfoProperties
| Property | Type | Description | |
|---|---|---|---|
| attr? | Record<string, boolean | null | number | string> | HTML attributes to be added. | |
| cls? | string | string[] | The class to be assigned. Can be a space-separated string or an array of strings. | |
| href? | string | The href to be assigned. Applies to <a>, <link>, and <base> elements. | |
| parent? | Node | The parent element to be assigned to. | |
| placeholder? | string | The placeholder to be assigned. Applies to <input> elements. | |
| prepend? | boolean | Whether to prepend the element to the parent. If true, the element will be inserted before the first child of the parent. If false or omitted, the element will be inserted after the last child of the parent. | |
| text? | DocumentFragment | string | The textContent to be assigned. | |
| title? | string | HTML title (for hover tooltip). | |
| type? | string | The type to be assigned. Applies to <input> and <style> elements. | |
| value? | string | The value to be assigned. Applies to <input>, <select>, and <option> elements. |
Links to this page: