X Tutup
Skip to content

fix(shims): Don't rely on prefixed requestAnimationFrame#4394

Closed
mgol wants to merge 1 commit intoangular:masterfrom
mgol:raf-polyfill-improvements
Closed

fix(shims): Don't rely on prefixed requestAnimationFrame#4394
mgol wants to merge 1 commit intoangular:masterfrom
mgol:raf-polyfill-improvements

Conversation

@mgol
Copy link
Copy Markdown
Member

@mgol mgol commented 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

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
@mgol mgol force-pushed the raf-polyfill-improvements branch from 3a11162 to 3940ba5 Compare September 28, 2015 13:27
@tbosch tbosch added pr_state: LGTM action: merge The PR is ready for merge by the caretaker labels Oct 5, 2015
@mary-poppins
Copy link
Copy Markdown

Merging PR #4394 on behalf of @tbosch to branch presubmit-tbosch-pr-4394.

@mary-poppins mary-poppins removed the action: merge The PR is ready for merge by the caretaker label Oct 5, 2015
@mgol mgol closed this in 9679fc9 Oct 6, 2015
@mgol mgol deleted the raf-polyfill-improvements branch October 6, 2015 17:24
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup