'innerText' works in IE, but not in Firefox

前端 未结 15 1484
执念已碎
执念已碎 2020-11-21 05:01

I have some JavaScript code that works in IE containing the following:

myElement.innerText = \"foo\";

However, it seems that the \'innerTex

15条回答
  •  Happy的楠姐
    2020-11-21 05:36

    innerText has been added to Firefox and should be available in the FF45 release: https://bugzilla.mozilla.org/show_bug.cgi?id=264412

    A draft spec has been written and is expected to be incorporated into the HTML living standard in the future: http://rocallahan.github.io/innerText-spec/, https://github.com/whatwg/html/issues/465

    Note that currently the Firefox, Chrome and IE implementations are all incompatible. Going forward, we can probably expect Firefox, Chrome and Edge to converge while old IE remains incompatible.

    See also: https://github.com/whatwg/compat/issues/5

提交回复
热议问题