Skip to main content

IDomMakerOptions

tw5-typed


tw5-typed / utils / IDomMakerOptions

Interface: IDomMakerOptions

Defined in: src/utils/index.d.ts:9

Properties

attributes?

optional attributes: Record<string, unknown>

Defined in: src/utils/index.d.ts:19

En

hashmap of attribute values

Zh

属性值的 map

Memberof

IDomMakerOptions


children?

optional children: Element[]

Defined in: src/utils/index.d.ts:30

En

array of further child nodes

Zh

其他子节点的数组

Memberof

IDomMakerOptions


class?

optional class: string

Defined in: src/utils/index.d.ts:41

En

class name(s)

Zh

元素的 class,多个则以空格分隔

Memberof

IDomMakerOptions


document?

optional document: TWDocument

Defined in: src/utils/index.d.ts:52

En

defaults to current document

Zh

默认为当前 document

Memberof

IDomMakerOptions


eventListeners?

optional eventListeners: EventListener[]

Defined in: src/utils/index.d.ts:63

En

array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)

Zh

事件监听器的数组(这个选项在$tw.utils.addEventListeners()被加载之前不会起作用)。

Memberof

IDomMakerOptions


innerHTML?

optional innerHTML: string

Defined in: src/utils/index.d.ts:74

En

optional HTML for element

Zh

元素的 HTML 内容

Memberof

IDomMakerOptions


namespace?

optional namespace: string

Defined in: src/utils/index.d.ts:81

Default

'http://www.w3.org/1999/xhtml'

Memberof

IDomMakerOptions


style?

optional style: Partial<CSSStyleDeclaration>

Defined in: src/utils/index.d.ts:92

En

Styles for Element

Zh

元素的样式

Memberof

IDomMakerOptions


text?

optional text: string

Defined in: src/utils/index.d.ts:103

En

text to add as a child node

Zh

添加为子节点的文本

Memberof

IDomMakerOptions