{{APIRef("DOM")}}
{{ Non-standard_header() }}
Summary
Node.innerText
is a nonstandard property that represents the 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 to the clipboard.
{{domxref("Node.textContent")}} is a somewhat similar standardized alternative, although there are important differences between the two.
Specification
Not part of any specification.
Microsoft has a description on MSDN.
kangax's blog post has a strawman draft of a specification.
Browser compatibility
{{ CompatibilityTable() }}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 4 | {{ CompatGeckoDesktop(45) }} | 6 | 9.6 (probably earlier) | 3 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 2.3 (probably earlier) | {{ CompatGeckoMobile(45) }} | 10 (probably earlier) | 12 | 4.1 (probably earlier) |
See also
- {{domxref("Node.outerText")}}
- {{domxref("Element.innerHTML")}}