For information, .innerText is a non-standard property introduced in Internet Explorer, reverse-engineered and copied by other browsers. It has not been standardized neither by HTML5 nor by the recent DOM4 effort yet. The documented parts of .innerText on MDN may not describe an exhaustive list of differences. As it turns out, Firefox never implemented it, so the web (JavaScript that currently run in modern web browsers) does not rely on it for now.

My 2 cents,

David

Le 23/02/2012 03:19, Kevin Reid a écrit :
Just a quick note: I found out that MDN says that .innerText and .textContent 
are slightly different, whereas Domado implements them the same (as 
.textContent). Is this worth fixing?

<https://developer.mozilla.org/En/DOM/Node.textContent#Differences_from_innerText>:
• Note that while textContent gets the content of all elements, including<script>  
and<style>  elements, the mostly equivalent IE-specific property, innerText, does not.
• innerText is also aware of style and will not return the text of hidden 
elements, whereas textContent will.
• As innerText is aware of CSS styling, it will trigger a reflow, whereas 
textContent will not.

Reply via email to