[whatwg] Proposal: Add HTMLElement.innerText

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.

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?)


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Monday, 16 August 2010 02:49:08 UTC