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

[whatwg] Proposal: Add HTMLElement.innerText

From: Jonas Sicking <jonas@sicking.cc>
Date: Sun, 15 Aug 2010 19:26:29 -0400
Message-ID: <AANLkTin+6vZ5wd3Km6ugpNojaRCOSNinEra0frakLS6f@mail.gmail.com>
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? What about display:none?

Is this really a feature that has interoperability?

/ Jonas
Received on Sunday, 15 August 2010 16:26:29 UTC

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