Prioritized Task Scheduling API Demo
Schedule work with scheduler.postTask() at three priorities
(user-blocking, user-visible, and background).
See the Prioritized Task Scheduling API on MDN.
Run tasks
The tasks run in priority order and also log to the browser console. The results below update as they run.
${status}
What the API provides
scheduler.postTask()— queue a task and await its result.scheduler.yield()— yield control back to the browser.TaskController/TaskSignal— change the priority of a queued task.