mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-29 16:30:54 +05:30
Improve rAF function
This commit is contained in:
parent
9536e89fba
commit
40def86590
@ -41,5 +41,8 @@ export function loadScript(src) {
|
||||
});
|
||||
}
|
||||
|
||||
export const rAF = window.requestAnimationFrame || window.mozRequestAnimationFrame
|
||||
|| window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
|
||||
export const rAF = window.requestAnimationFrame
|
||||
|| window.mozRequestAnimationFrame
|
||||
|| window.webkitRequestAnimationFrame
|
||||
|| window.msRequestAnimationFrame
|
||||
|| ((cb) => setTimeout(cb, 1000 / 60));
|
||||
|
Loading…
Reference in New Issue
Block a user