requestIdleCallback-polyfill
requestIdleCallback-polyfill copied to clipboard
Polyfill for request idle callback. Determines is user interacting with document and fires when it is not or after interaction is finished.
When use in framework context with component life cycle, you usually want to make sure to cancel all the listener and callback that could have affected your component once unmounted....
The current api looks like it implements RIC with a number value for `timeRemaining` in the `IdleDeadline`. This should be a method returning a number. https://developer.mozilla.org/en-US/docs/Web/API/IdleDeadline/timeRemaining
Please add UMD wrapper to support different environments.