FYI: Single out IE8 as a separate execution environment #1901
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.
https://github.com/facebook/react/pull/1901/files?w=1 (without whitespace changes)
@zpao I did a quick test just to see what would happen if we singled out IE8 and made it possible to strip it from the final build. I'm pretty confident that no other old browser got caught in the cross-fire, but would obviously have to validate (not that I recommend taking this PR as-is), and I think there are a few other call sites that are IE8 specific. I was also unsure about
getMarkupWrap
, couldn't quite decode what was IE8 specific and not.Current master size:
IE8 compatible build (can be made smaller):
IE9+ compatible build (isIE8 is constant false):
So it stripped away slightly more than 1% (from master), mostly courtesy of 3 large functions being stripped out of ChangeEventPlugin + innerHTML I assume. Regardless of if we care about separate builds, the method of using
isIE8
in this PR might still be worth switching to (cssShorthandExpansion
is no longer applied to all browsers, etc).PS. It also seems like
ViewportMetrics
should be able to be put underisIE8
.