mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-01-04 11:12:49 +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
|
export const rAF = window.requestAnimationFrame
|
||||||
|| window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
|
|| window.mozRequestAnimationFrame
|
||||||
|
|| window.webkitRequestAnimationFrame
|
||||||
|
|| window.msRequestAnimationFrame
|
||||||
|
|| ((cb) => setTimeout(cb, 1000 / 60));
|
||||||
|
Loading…
Reference in New Issue
Block a user