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

[whatwg] Proposal: Add HTMLElement.innerText

From: Ian Hickson <ian@hixie.ch>
Date: Sun, 15 Aug 2010 00:04:31 +0000 (UTC)
Message-ID: <Pine.LNX.4.64.1008150003210.19139@ps20323.dreamhostps.com>
On Sat, 14 Aug 2010, Adam Barth wrote:
> 
> We should expose a property on HTMLElement similar to innerHTML called 
> innerText.  When assigning a string to innerText, the string is placed 
> in a text node (and is not parsed as HTML).

How would this differ from textContent?


> HTMLElement.innerText appears to be deployed in Internet Explorer, 
> Chrome, Safari, and Opera.  However, the API is missing from Firefox and 
> the HTML5 spec.  (Note the existing implementations of the API seem to 
> do some work around newline normalization, which we should consider when 
> adding the API to the specification.)

I'm happy to add it if it's needed for compat, but the feature itself is 
already available in the DOM. Is it needed for compat?

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 14 August 2010 17:04:31 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:00 UTC