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

[whatwg] Proposal: Add HTMLElement.innerText

From: Mike Wilcox <mike@mikewilcox.net>
Date: Sun, 15 Aug 2010 19:26:23 -0500
Message-ID: <088298C6-4B83-427E-AA4B-C1438322CDF0@mikewilcox.net>
On Aug 15, 2010, at 6:26 PM, Jonas Sicking wrote:

> On Sun, Aug 15, 2010 at 11:17 AM, Mike Wilcox <mike at mikewilcox.net> wrote:
>> innerText is one of those things IE got right, just like innerHTML. Let's please consider making that a standard instead of removing it. Also, please don't make the mistake of thinking it is the same thing as textContent. Think of textContent as pre-formatted text, and innerText as plain text. IE even correctly handles a span with display:block; and adds a line break.
> Whoa! That was new information to me. Does webkit also take CSS
> information into account?


> What happens with elements that have
> white-space:pre?

It maintains the formatting.

> What about display:none?

Does not show.

Safari and IE look to handle everything consistently.

> Is this really a feature that has interoperability?

Between what?

Received on Sunday, 15 August 2010 17:26:23 UTC

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