3 ms·
The idea is that you schedule low priority work to happen with requestIdleCallback (which this is just a wrapper around), so it doesn't impact as much higher-pr
by madeofpalk 4y ago
The idea is that you schedule low priority work to happen with requestIdleCallback (which this is just a wrapper around), so it doesn't impact as much higher-priority tasks like responding to input or animations.
For example, you may schedule periodic API polling (and JSON response parsing) using this API to prioritise user input handling.
I would guess (but not know!) that the browser could de-prioritise these tasks even further when the browser decides to (such as when in the background).