Skip to content

Commit b758b3e

Browse files
authored
Merge branch 'main' into fix-publish-ci
2 parents 3fa79ec + edf4a7b commit b758b3e

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/ElementComponent.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,22 @@ export abstract class ElementComponent<T extends Element> {
129129
return this;
130130
}
131131

132+
/**
133+
* Set text content
134+
*/
135+
public text(text: string) {
136+
this.element.textContent = text;
137+
return this;
138+
}
139+
140+
/**
141+
* Set inner HTML
142+
*/
143+
public html(html: string) {
144+
this.element.innerHTML = html;
145+
return this;
146+
}
147+
132148
/**
133149
* Set element property
134150
* @param name property name

0 commit comments

Comments
 (0)