mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
|
|
declare const __zone_symbol__requestAnimationFrame: any;
|
|
declare const requestAnimationFrame: any;
|
|
|
|
export const raf = (h: any) => {
|
|
if (typeof __zone_symbol__requestAnimationFrame === 'function') {
|
|
return __zone_symbol__requestAnimationFrame(h);
|
|
}
|
|
if (typeof requestAnimationFrame === 'function') {
|
|
return requestAnimationFrame(h);
|
|
}
|
|
return setTimeout(h);
|
|
};
|