[whatwg] Proposal: Add HTMLElement.innerText

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