innerText property
The innerText
property of the HTMLElement
interface represents the
rendered text content of a node and its descendants.
As a getter, it approximates the text the user would get if they
highlighted the contents of the element with the cursor and then copied it
to the clipboard.
As a setter this will replace the element's children with the given value,
converting any line breaks into br
elements.
Note:
innerText
is easily confused withNode.textContent
, but there are important differences between the two. Basically,innerText
is aware of the rendered appearance of text, whiletextContent
is not.
Implementation
external String get innerText;
Implementation
external set innerText(String value);