JavaScript Navigator scheduling Property

Beginner
⏱️ 10 min read
📚 Updated: Jul 2026
🎯 5 Examples
🚀 5 Try-it labs
Experimental

What You’ll Learn

navigator.scheduling is an experimental Navigator entry point for a Scheduling object. Learn what it returns, how isInputPending() helps keep pages responsive, why the Scheduler API is preferred, five examples, and try-it labs.

01

Kind

Read-only property

02

Returns

Scheduling

03

Status

Experimental

04

Key method

isInputPending()

05

Goal

Stay responsive

06

Modern path

Scheduler API

Introduction

Long JavaScript loops can freeze the UI: clicks and key presses wait until your script finishes. Scheduling helpers let you ask: is the user trying to interact right now?

Reading navigator.scheduling gives you a Scheduling object. Its main method, isInputPending(), returns true when pending input events sit in the event queue.

💡
Beginner idea

While you process a big task list, check for pending input. If the user is interacting, pause briefly (yield) so the browser can handle the click or key, then continue.

Learn this API for understanding responsiveness techniques — and know that newer Scheduler features are the preferred direction for new code.

Understanding the scheduling Property

navigator.scheduling is not a Boolean. It is an object that exposes scheduling helpers for the current document.

  • Read-only — you inspect the object; you do not assign to it.
  • isInputPending() — returns whether pending input is waiting.
  • includeContinuous — optional flag to include continuous events such as mousemove / wheel.
  • Experimental — feature-detect; do not require it for core UX.
  • Superseded path — prefer Scheduler when available.

📝 Syntax

General form of the property:

JavaScript
navigator.scheduling

Value

  • A Scheduling object (when supported).

Common patterns

JavaScript
// Always feature-detect first
if (
  "scheduling" in navigator &&
  typeof navigator.scheduling.isInputPending === "function"
) {
  const pending = navigator.scheduling.isInputPending();
  console.log("input pending?", pending);

  // Optional: include continuous events (mousemove, wheel, …)
  const pendingContinuous = navigator.scheduling.isInputPending({
    includeContinuous: true
  });
  console.log("pending (incl. continuous)?", pendingContinuous);
} else {
  console.log("navigator.scheduling is not available.");
}

// Prefer Scheduler when present (modern alternative)
if (globalThis.scheduler && typeof scheduler.yield === "function") {
  // await scheduler.yield();
}

⚡ Quick Reference

GoalCode
Get Scheduling objectnavigator.scheduling
Feature detect"scheduling" in navigator
Pending input?navigator.scheduling.isInputPending()
Include continuous eventsisInputPending({ includeContinuous: true })
Returnstrue / false
Modern alternativescheduler.yield() / postTask()
Status (MDN)Experimental

🔍 At a Glance

Four facts to remember about navigator.scheduling.

Returns
Scheduling

API entry point

Status
experimental

Not Baseline

Method
isInputPending

boolean check

Prefer
Scheduler

Newer API

📋 scheduling vs Scheduler vs Blind Yielding

navigator.schedulingscheduler (Scheduler API)setTimeout(0) only
MaturityExperimental; superseded pathPreferred for new scheduling workWidely available
IdeaYield when input is pendingExplicit yield / prioritized tasksYield at fixed intervals
Best forLearning / legacy Chromium demosModern responsive task runnersSimple fallback everywhere

Examples Gallery

Every example feature-detects first. Prefer Try It Yourself — results depend on browser support and whether input is pending at that moment.

📚 Getting Started

Detect the API and read a single pending-input check.

Example 1 — Feature-Detect scheduling

Always check support before using the property.

JavaScript
const hasScheduling = "scheduling" in navigator;
const hasMethod =
  hasScheduling &&
  typeof navigator.scheduling.isInputPending === "function";

console.log("scheduling in navigator: " + hasScheduling);
console.log("isInputPending available: " + hasMethod);
Try It Yourself

How It Works

Sample output shows a supporting Chromium browser. Others may print false.

Example 2 — Call isInputPending()

Ask once whether input is waiting right now.

JavaScript
if (
  "scheduling" in navigator &&
  typeof navigator.scheduling.isInputPending === "function"
) {
  const pending = navigator.scheduling.isInputPending();
  console.log("isInputPending(): " + pending);
} else {
  console.log("navigator.scheduling is not available.");
}
Try It Yourself

How It Works

Idle pages usually return false. Clicking while a long script runs can flip it to true.

📈 Practical Patterns

Continuous events, a mini task runner, and the Scheduler fallback.

Example 3 — includeContinuous Option

Optionally count continuous events like mouse move and wheel.

JavaScript
if (
  "scheduling" in navigator &&
  typeof navigator.scheduling.isInputPending === "function"
) {
  const discrete = navigator.scheduling.isInputPending();
  const continuous = navigator.scheduling.isInputPending({
    includeContinuous: true
  });
  console.log("default: " + discrete);
  console.log("includeContinuous: " + continuous);
} else {
  console.log("navigator.scheduling is not available.");
}
Try It Yourself

How It Works

MDN: includeContinuous defaults to false. Set true to treat continuous trusted events as pending input.

Example 4 — Yield Only When Input Is Pending

Simplified version of MDN’s task-runner idea.

JavaScript
function yieldToMain() {
  return new Promise(function (resolve) {
    setTimeout(resolve, 0);
  });
}

async function runTasks(tasks) {
  while (tasks.length > 0) {
    const canCheck =
      "scheduling" in navigator &&
      typeof navigator.scheduling.isInputPending === "function";

    if (canCheck && navigator.scheduling.isInputPending()) {
      await yieldToMain();
      continue;
    }

    const task = tasks.shift();
    task();
  }
}

runTasks([
  function () { console.log("task A"); },
  function () { console.log("task B"); },
  function () { console.log("task C"); }
]).then(function () {
  console.log("done");
});
Try It Yourself

How It Works

With no pending input, tasks run back-to-back. If input arrives mid-loop, the runner yields so the UI can respond.

Example 5 — Prefer Scheduler When Available

Detect both APIs and choose the modern path first.

JavaScript
const lines = [];

if (globalThis.scheduler && typeof scheduler.yield === "function") {
  lines.push("Scheduler.yield: available — prefer this for new code");
} else {
  lines.push("Scheduler.yield: missing");
}

if (
  "scheduling" in navigator &&
  typeof navigator.scheduling.isInputPending === "function"
) {
  lines.push(
    "navigator.scheduling.isInputPending: available — experimental / legacy path"
  );
} else {
  lines.push("navigator.scheduling.isInputPending: missing");
}

lines.push("Fallback everywhere: setTimeout(fn, 0) / requestAnimationFrame");
console.log(lines.join("\n"));
Try It Yourself

How It Works

Matches MDN guidance: learn scheduling, prefer Scheduler for new work, keep a universal yield fallback.

🚀 Common Use Cases

  • Long task runners — process many chunks without freezing clicks.
  • Heavy client work — parsing, transforms, or batch DOM updates.
  • Learning responsiveness — understand yielding vs blocking the main thread.
  • Legacy Chromium demos — code that already uses isInputPending().
  • Not a must-have API — keep setTimeout / Scheduler fallbacks.

🧠 How navigator.scheduling Helps Responsiveness

1

Script runs a long job

Many tasks execute on the main thread.

Work
2

User clicks or types

Input events wait in the browser event queue.

Input
3

isInputPending() returns true

Your loop notices pending interaction.

Check
4

You yield, then continue

The browser handles input; your tasks resume afterward.

📝 Notes

  • Experimental — not Baseline; feature-detect always.
  • Returns a Scheduling object; main method is isInputPending().
  • MDN: superseded by the Scheduler interface for new scheduling work.
  • Read-only entry point on Navigator.
  • Related: productSub, serial, Window, JavaScript hub.

Limited / Experimental Support

navigator.scheduling is Experimental and not Baseline. Support is limited (commonly Chromium-based browsers for isInputPending()). Always feature-detect and keep a setTimeout / Scheduler fallback.

Experimental · Not Baseline

Navigator.scheduling

Useful for learning input-aware yielding. Prefer Scheduler APIs for new production scheduling when available.

Limited Experimental
Google Chrome Scheduling / isInputPending (Chromium path)
Limited
Microsoft Edge Follow Chromium Scheduling support
Limited
Opera Follow Chromium Scheduling support
Limited
Mozilla Firefox Typically unavailable — feature-detect
Unavailable
Apple Safari Typically unavailable — feature-detect
Unavailable
Internet Explorer No Scheduling API support
Unavailable
scheduling Limited

Bottom line: Detect navigator.scheduling.isInputPending, prefer scheduler.yield when present, and never require this API for core UX.

Conclusion

navigator.scheduling is an experimental entry point to a Scheduling object whose isInputPending() method helps long scripts stay responsive. Feature-detect it, treat it as optional, and prefer the newer Scheduler API when you can.

Continue with serial, productSub, or the JavaScript hub.

💡 Best Practices

✅ Do

  • Feature-detect before calling isInputPending()
  • Yield only when needed to keep work efficient
  • Prefer Scheduler APIs for new code
  • Keep a setTimeout(0) fallback
  • Break huge jobs into smaller tasks

❌ Don’t

  • Assume every browser has navigator.scheduling
  • Block the main thread for seconds without yielding
  • Require this API for core page functionality
  • Ignore MDN’s Scheduler supersession guidance
  • Assign to navigator.scheduling

Key Takeaways

Knowledge Unlocked

Five things to remember about scheduling

Experimental entry point — check pending input, prefer Scheduler for new work.

5
Core concepts
02

Method

isInputPending

API
🔬 03

Status

experimental

Caution
🔒 04

Access

read-only

Navigator
🎯 05

Prefer

Scheduler

Modern

❓ Frequently Asked Questions

A Scheduling object for the current document. Its main method is isInputPending(), which tells you whether pending input events are waiting in the event queue.
MDN marks navigator.scheduling Experimental. It is not Baseline. Always feature-detect before calling isInputPending().
During long JavaScript work, you can check if the user is trying to interact. If true, yield to the main thread so clicks and keys feel responsive.
Prefer the newer Scheduler interface (for example scheduler.yield() / Prioritized Task Scheduling) when available. MDN warns that Scheduling / isInputPending has been superseded by better Scheduler features.
Check "scheduling" in navigator and typeof navigator.scheduling.isInputPending === "function" before calling it.
No. It is a read-only Navigator property. You use the returned Scheduling object; you do not assign a new value.
Did you know?

isInputPending() started as a Facebook contribution to browsers so huge scripts could stay interactive. Today MDN points new work toward the Prioritized Task Scheduling API (Scheduler) instead.

Learn serial Next

Web Serial API — talk to boards and serial gadgets in the browser.

serial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful