gloo icon indicating copy to clipboard operation
gloo copied to clipboard

requestIdleCallback and Safari Polyfill

Open jkelleyrtp opened this issue 4 years ago • 1 comments

Gloo recently got RequestAnimationFrame (yay!). It would be nice to also have requestIdleCallback that comes with the "Deadline" object.

I would like to see rIC as both a callback and a future type API so you could await the next idle frame.

Before I go about implementing this:

  • Is there something similar to rIC to work from that fits with the gloo patterns?
  • Is this something gloo will accept?
  • Are there any ideas on what rIC should look like and how it should polyfill?

jkelleyrtp avatar Jul 14 '21 20:07 jkelleyrtp

Is there something similar to rIC to work from that fits with the gloo patterns?

Is requestAnimationFrame not a good reference point?

Is this something gloo will accept?

I don't see why not

Are there any ideas on what rIC should look like and how it should polyfill?

I think the API should probably be like requestAnimationFrame one. Not sure about polyfill though. Is that something gloo should even provide?

ranile avatar Jul 16 '21 14:07 ranile