W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2010

[whatwg] Proposal: Add HTMLElement.innerText

From: Markus Ernst <derernst@gmx.ch>
Date: Mon, 16 Aug 2010 12:58:09 +0200
Message-ID: <4C6919C1.2000609@gmx.ch>
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.
Received on Monday, 16 August 2010 03:58:09 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:26 UTC