requestIdleCallback-polyfill icon indicating copy to clipboard operation
requestIdleCallback-polyfill copied to clipboard

No cancelIdleCallback support

Open julienR2 opened this issue 5 years ago • 0 comments

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.

However this polyfill doesn't implement the cancelIdleCallback which can lead to errors like window.cancelIdleCallback(..) is not a function on browsers not supporting ric

I made a PR to add this support to the current polyfill https://github.com/PixelsCommander/requestIdleCallback-polyfill/pull/4

julienR2 avatar Jul 12 '19 09:07 julienR2