Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

ReferenceError: Can't find variable: cancelIdleCallback Script Element #26

Open
c0nstantine opened this issue Jul 17, 2020 · 0 comments

Comments

@c0nstantine
Copy link

c0nstantine commented Jul 17, 2020

is there any reason to avoid for cancelIdleCallback checking here:
https://github.com/GoogleChromeLabs/idlize/blob/master/idle-callback-polyfills.mjs#L80
it creates problems when a page has requestIdleCallback but might not have cancelIdleCallback function

can we check here for cancelIdleCallback as well ?
e.g.:
const supportsRequestIdleCallback_ = typeof requestIdleCallback === 'function' && typeof cancelIdleCallback === "function";

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant