'innerText' works in IE, but not in Firefox

cross-browser, firefox, internet-explorer, javascript

Solution

Firefox uses the W3C-compliant textContent property.

I'd guess Safari and Opera also support this property.

Problem

I have some JavaScript code that works in IE containing the following: ``` myElement.innerText = "foo"; ``` However, it seems that the 'innerText' property does not work in Firefox. Is there some Firefox equivalent? Or is there a more generic, cross browser property that can be used?

Original source