Skip to content
This repository has been archived by the owner on Sep 20, 2018. It is now read-only.

textContent instead of innerText when available #98

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

toothbrush7777777
Copy link

Fixes #88 and shouldn't affect the site (it falls back to using innerText if textContent is not supported).

Gecko does not support innerText, but Internet Explorer 9+ supports textContent, as does Chrome; see https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent.
DOM 3, DOM4, and DOM all define textContent, while innerText is a propriety Internet Explorer extension supported by Chrome and Opera for compatibility with MSIE.

The DOM Living Standard, DOM4 and DOM 3 all define `textContent`. Internet Explorer 9+ supports `textContent`, as does Chrome.
See https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant