calibreapp/react-live-chat-loader

Always use requestIdleCallback

stramel opened this issue · 1 comments

It would simplify the logic a bit if you always used requestIdleCallback and required anyone supporting a browser without support to polyfill it using setTimeout.

https://gist.github.com/paullewis/55efe5d6f05434a96c36

The helper we've used for requestIdleTimeout is both short and free of issues for older browsers.

If you'd like to see this, please create a PR demonstrating why it's an improvement we should consider.