Web APIs

Prioritized Task Scheduling API

Checking compatibility...

Schedule tasks with different priorities, enabling better control over when and how tasks are executed based on their importance.

Basic Task Scheduling

Run tasks with different priority levels. This example shows how to mark tasks as high priority (user-blocking), medium priority (user-visible), or low priority (background) so the browser can schedule them appropriately.

=
=
=
=
=
=

Output

Click Run to see output...

Task Scheduling with Deadlines

Set time limits for scheduled tasks. This example demonstrates how to ensure tasks complete within a specific timeframe, which is useful for operations that shouldn't be delayed too long even if they're low priority.

=
=
=
=
=
=

Output

Click Run to see output...

Task Scheduling with Abort Control

Cancel tasks that are no longer needed. This example shows how to stop scheduled tasks that become unnecessary, which helps save resources and improve performance.

=
=
=
=
=
=

Output

Click Run to see output...