From 0bedab42730d1bf4a5a1d3b3e6425e06556656d9 Mon Sep 17 00:00:00 2001 From: Scott Haseley Date: Fri, 6 Feb 2026 14:05:53 -0800 Subject: [PATCH] Intialize timeout to 0 and replace 'is present' check with comparison --- index.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index a756f0d..7d63b98 100644 --- a/index.html +++ b/index.html @@ -283,7 +283,7 @@

{{Window}} interface extensions

}; dictionary IdleRequestOptions { - unsigned long timeout; + unsigned long timeout = 0; }; [Exposed=Window] interface IdleDeadline { @@ -309,9 +309,9 @@

{{Window}} interface extensions

The requestIdleCallback() method

When {{Window/requestIdleCallback}}(|callback|, |options|) is - invoked with a given IdleRequestCallback - and optional IdleRequestOptions, the user agent - MUST run the following steps:

+ invoked with a given IdleRequestCallback and + IdleRequestOptions, the user agent MUST run the following + steps:

  1. Let window be this {{Window}} object.
  2. Increment the window's idle callback identifier @@ -328,9 +328,9 @@

    The requestIdleCallback() method

    cancel each other—e.g. if the idle callback is scheduled first, then it cancels the timeout callback, and vice versa.

  3. -
  4. If the timeout - property is present in options and has a positive - value: +
  5. Let timeout be options["timeout"].
  6. +
  7. If timeout is greater than 0:
    1. Wait for timeout milliseconds.
    2. Wait until all invocations of this algorithm, whose