[whatwg] Proposal: Add HTMLElement.innerText

On Aug 16, 2010, at 2:49 AM, Anne van Kesteren wrote:

> On Mon, 16 Aug 2010 11:23:55 +0200, Maciej Stachowiak <mjs at apple.com> wrote:
>> We do consider this, but since the status quo is "every browser but Firefox implements it", it's not clear that flipping WebKit-based browsers from one column to the other is a genuine interoperability improvement. Nor does it seem clear that changing all other browsers to match the odd man out is even the best overall strategy to getting there.
> 
> We would need to get a very solid definition for it though as it is not at all implemented in the same way.

I agree that to achieve full interop it would require a proper spec. 

> 
> http://software.hixie.ch/utilities/js/live-dom-viewer/
> 
> <!DOCTYPE html>...<span style=display:block>test</span><script> w(encodeURI(document.body.innerText)) </script>
> 
> Opera does not use a newline for <span> set to display:block and includes (contrary to e.g. Chrome) the contents of the <script> element.
> 
> If this can somehow share a lot of code with copy and paste -- as you indicate -- that does make it more interesting to keep, in my opinion.
> 
> 
> (What is up with Safari and the w() function on Live DOM Viewer by the way? It very rarely works for me. Do I need to run nightlies?)

Worked for me in both Safari 5.0.1 and a recent nightly when I tried it.

Regards,
Maciej

Received on Monday, 16 August 2010 02:58:22 UTC