--

I mean it's super simple. You can do it as easy as:

window.requestIdleCallback = (fn, opts) => fn()

or even better like so:

window.requestIdleCallback = (fn, opts) => {

setTimeout(fn, opts?.timeout ?? 0)

}

This is off the top of my head, but this is the basic gist of it.

--

--

No responses yet