Am 16.08.2010 11:23 schrieb Maciej Stachowiak:

- Is it a genuinely useful feature? Yes, the ability to get plaintext content as rendered is a useful feature and annoying to implement from scratch. To give one very marginal data point, it's used by our regression text framework to output the plaintext version of a page, for tests where layout is irrelevant. A more hypothetical use would be a rich text editor that has a "convert to plaintext" feature. textContent is not as useful for these use cases, since it doesn't handle line breaks and unrendered whitespace properly.

Additionnally, from a humble author's POV, once you learnt that innerHTML is now available in the standard, it would be quite intuitive to also have innerText.

Reply via email to