[whatwg] Proposal: Add HTMLElement.innerText

Jonas Sicking jonas at sicking.cc
Sun Aug 15 16:26:29 PDT 2010


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



More information about the whatwg mailing list