Repository navigation
fix(aio): switch from innerText to textContent to support older browsers - #17598
Merged
Merged
Conversation
gkalpak
force-pushed
the
fix-aio-firefox-44
branch
from
June 18, 2017 09:39
ed8e614 to
44c1d08
Compare
|
The angular.io preview for ed8e614183b1d549cc8d8f617de0d5d0c08aca56 is available here. |
|
The angular.io preview for 44c1d08b1c0a048f8d95e1c26c94031efd30dd5d is available here. |
1 of 8 tasks
petebacondarwin
approved these changes
Jun 19, 2017
…rowsers `innerText` is not supported in Firefox prior to v45. In most cases (at least the ones we are interested in), `innerText` and `textContent` work equally well, but `textContent` is more performant (as it doesn't require a reflow). From [MDN][1] on the differences of `innerText` vs `textContent`: > - [...] > - `innerText` is 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. > - [...] [1]: https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent#Differences_from_innerText Fixes angular#17585
gkalpak
force-pushed
the
fix-aio-firefox-44
branch
from
June 19, 2017 10:07
44c1d08 to
237480e
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
innerTextis not supported in Firefox prior to v45. In most cases (at least the ones we are interested in),innerTextandtextContentwork equally well, buttextContentis more performant (as it doesn't require a reflow).From MDN on the differences of
innerTextvstextContent:Fixes #17585.