Files
NapCatQQ/.pnpm-store/v3/files/5b/bd6c53f7ec8ae55c78622e3d79c28ee107a3b40c7b09a3954e70c66448a5e8745f1d8bee59f8901e4f983bc92dd5ad25fb88abde8faf6096440af91fc64b44
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

19 lines
635 B
Plaintext

import global from './global.js';
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
export default (() => {
if (typeof requestAnimationFrame === 'function') {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global);
}
return callback => setTimeout(() => callback(Date.now()), 1000 / 60);
})();