Editor / DOM Helper / setText
Function: setText()
ts
function setText(selector, text): void;Sets the text content of a DOM element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
| The selector for the element. |
|
| The text to set as the content. |
Returns
void
Example
ts
setText('#label-id', 'Updated text');