[whatwg] Proposal: Add HTMLElement.innerText
Mike Wilcox
mike at mikewilcox.net
Sun Aug 15 17:26:23 PDT 2010
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?
Yes
> 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?
Mike
More information about the whatwg
mailing list