-
Notifications
You must be signed in to change notification settings - Fork 12.8k
window.requestIdleCallback #21309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Comments
We don't include experimental APIs in |
Too bad. |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Posting this here for people who want to copy/paste into their projects: type RequestIdleCallbackHandle = any;
type RequestIdleCallbackOptions = {
timeout: number;
};
type RequestIdleCallbackDeadline = {
readonly didTimeout: boolean;
timeRemaining: (() => number);
};
declare global {
interface Window {
requestIdleCallback: ((
callback: ((deadline: RequestIdleCallbackDeadline) => void),
opts?: RequestIdleCallbackOptions,
) => RequestIdleCallbackHandle);
cancelIdleCallback: ((handle: RequestIdleCallbackHandle) => void);
}
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From @bsvipas on January 19, 2018 7:0
There's no suggestion for
window.requestIdleCallback
(rIC) only forwindow.requestAnimationFrame
(rAF).Copied from original issue: microsoft/vscode#41850
The text was updated successfully, but these errors were encountered: