Skip to content

DomElementInfo.text?

DomElementInfo › text?

Official

Type: DocumentFragment | string

The textContent to be assigned.

Example:

createEl('p', { text: 'foo' });
const fragment = createFragment();
fragment.createEl('strong', { text: 'bar' });
createEl('p', { text: fragment });