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:
- Let window be this {{Window}} object.
- 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.
- - If the
timeout
- property is present in options and has a positive
- value:
+ - Let timeout be options["
timeout"].
+ - If timeout is greater than 0:
- Wait for timeout milliseconds.
- Wait until all invocations of this algorithm, whose