Skip to content

Prefer requestAnimationFrame() over setTimeout() #1358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 3, 2020
Merged

Prefer requestAnimationFrame() over setTimeout() #1358

merged 1 commit into from
Oct 3, 2020

Conversation

jdufresne
Copy link
Contributor

For UI changes that need to delay until the next browser repaint, using
requestAnimationFrame() is preferred over using an arbitrary short time
with setTimeout().

https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame

For UI changes that need to delay until the next browser repaint, using
requestAnimationFrame() is preferred over using an arbitrary short time
with setTimeout().

https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
@matthiask matthiask merged commit 11f60d7 into django-commons:master Oct 3, 2020
@jdufresne jdufresne deleted the anim branch October 4, 2020 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants