Skip to content

DomElementInfo

Unofficial

Options object passed to createEl.

Signature:

export interface DomElementInfo

Properties

PropertyTypeDescription
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?stringThe href to be assigned. Applies to <a>, <link>, and <base> elements.
parent?NodeThe parent element to be assigned to.
placeholder?stringThe placeholder to be assigned. Applies to <input> elements.
prepend?booleanWhether 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 | stringThe textContent to be assigned.
title?stringHTML title (for hover tooltip).
type?stringThe type to be assigned. Applies to <input> and <style> elements.
value?stringThe value to be assigned. Applies to <input>, <select>, and <option> elements.

Links to this page: