fix(shims): Don't rely on prefixed requestAnimationFrame#4394
Closed
mgol wants to merge 1 commit intoangular:masterfrom
Closed
fix(shims): Don't rely on prefixed requestAnimationFrame#4394mgol wants to merge 1 commit intoangular:masterfrom
mgol wants to merge 1 commit intoangular:masterfrom
Conversation
mgol
referenced
this pull request
Sep 28, 2015
The `ms` & `moz` prefixes are not needed. `ms` was never available in a public IE release (IE 10 has an unprefixed version) and Firefox has unprefixed rAF since v24 - current version is 41. Even more, Firefox versions below 22 don't have cancelAnimationFrame so it's better to not use the prefixed version at all to avoid surprises. The `o` prefix is also useless - Opera Presto never had rAF and the Chromium-based Opera doesn't use the `o` prefix. Also, switched from `new Date().getTime()` to `Date.now()` as it's supported everywhere (even in Android 2.3) except IE<9 and it avoids a useless date object construction. See http://caniuse.com/#feat=requestanimationframe for more info. Refs 4f56a01
3a11162 to
3940ba5
Compare
|
Merging PR #4394 on behalf of @tbosch to branch presubmit-tbosch-pr-4394. |
|
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.
The
ms&mozprefixes are not needed.mswas never available in a publicIE release (IE 10 has an unprefixed version) and Firefox has unprefixed
rAF since v24 - current version is 41. Even more, Firefox versions below 22
don't have cancelAnimationFrame so it's better to not use the prefixed version
at all to avoid surprises.
The
oprefix is also useless - Opera Presto never had rAF and theChromium-based Opera doesn't use the
oprefix.Also, switched from
new Date().getTime()toDate.now()as it's supportedeverywhere (even in Android 2.3) except IE<9 and it avoids a useless date
object construction.
See http://caniuse.com/#feat=requestanimationframe for more info.
Refs 4f56a01