fix: typo

This commit is contained in:
Acid Chicken (硫酸鶏) 2023-07-21 10:56:48 +00:00 committed by GitHub
parent a87dd5ddec
commit 40c5699d93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
const requestIdleCallback: typeof globalThis.requestIdleCallback = globalThis.requestIdleCallback ?? (callback) => {
const requestIdleCallback: typeof globalThis.requestIdleCallback = globalThis.requestIdleCallback ?? ((callback) => {
const start = performance.now();
const timeoutId = setTimeout(() => {
callback({
@ -10,10 +10,10 @@ const requestIdleCallback: typeof globalThis.requestIdleCallback = globalThis.re
});
});
return timeoutId;
};
const cancelIdleCallback: typeof globalThis.cancelIdleCallback = globalThis.cancelIdleCallback ?? (timeoutId) => {
});
const cancelIdleCallback: typeof globalThis.cancelIdleCallback = globalThis.cancelIdleCallback ?? ((timeoutId) => {
clearTimeout(timeoutId);
};
});
class IdlingRenderScheduler {
#renderers: Set<FrameRequestCallback>;