From 0f4aab063c416de9e4957578ad12aa44c0a0d1cc Mon Sep 17 00:00:00 2001
From: Noam Rosenthal
@@ -88978,7 +88980,7 @@ dictionary PageTransitionEventInit : EventInitforcibly close
eventSource.requestIdleCallback()
Empty window's list of active timers.
Empty window's map of active timers.
Each window event loop has a DOMHighResTimeStamp +
Each window event loop has a DOMHighResTimeStamp
last render opportunity time, initially set to zero.
Each window event loop has a DOMHighResTimeStamp +
Each window event loop has a DOMHighResTimeStamp
last idle period start time, initially set to zero.
To get the same-loop windows for a
- window event loop loop, return all Window
objects whose
- relevant agent's event loop is
- loop.
To get the same-loop windows for a window event loop loop,
+ return all Window
objects whose relevant agent's
+ event loop is loop.
currently running task's source is
- not the idle-task task source
-
- This is to ensure that the idle tasks themselves don't generate a new idle
- period. See
- requestIdleCallback #96. then for each then:
Let deadline be this event loop's
- last idle period start time plus 50. Let computeDeadline be the following steps: The cap of 50ms in the future is to ensure responsiveness to new user input
- within the threshold of human perception. Let deadline be this event loop's
+ last idle period start time plus 50. Check for potential pending rendering: If any The cap of 50ms in the future is to ensure responsiveness to new user input
+ within the threshold of human perception. Check for pending timers: for each Let hasPendingRenders be false.
- If deadline is less than the current high resolution time,
- return zero. For each Return deadline. If windowInSameLoop's map of animation frame callbacks is
+ not empty, or if the user agent believes that the
+ windowInSameLoop might have pending rendering updates, set
+ hasPendingRenders to true. Let timerCallbackEstimates be the result of
+ getting the values of
+ windowInSameLoop's map of active timers For each estimate in timerCallbackEstimates, do the
+ following: Let timeoutDeadline be the result of calling
+ estimateTimerCallback. If timeoutDeadline is less than deadline, set
+ deadline to timeoutDeadline.Window
win in the same-loop windows for
- this event loop, start an idle period for win with the
- following steps to compute the current idle period deadline:
+
Window
in the
- same-loop windows for this event loop's map of animation frame
- callbacks is not empty, or if the user agent believes that the Window
- might have pending rendering updates, set deadline to this event loop's
- last render opportunity time plus 16, if it is less than
- deadline.Window
win in the
- same-loop windows for this event loop: For each timerEntry
- in window's list of active timers, set deadline to the
- result of calling timerEntry's estimate next callback time if it is
- less than deadline.Window
windowInSameLoop the same-loop windows
+ for this event loop, do the following:
+
+
+
+
If hasPendingRenders is true, then:
+ +Let nextRenderDeadline be this event loop's + last render opportunity time plus 16.
If nextRenderDeadline is less than + deadline, then return nextRenderDeadline.
Return deadline.
For each Window
win in the same-loop windows for
+ this event loop, start an idle period for win with
+ computeDeadline.
Objects that implement the WindowOrWorkerGlobalScope
mixin have a list of active timers. Each entry in this lists is identified by a number, which must
- be unique within the list for the lifetime of the object that implements the
- WindowOrWorkerGlobalScope
mixin, and has an estimate next callback time,
- an algorithm returing a DOMHighResTimestamp.
WindowOrWorkerGlobalScope
mixin, and each value is an
+ algorithm returing a DOMHighResTimeStamp
, representing the next estimated callback
+ time for that timer.
+
+ To get the list of active timers for WindowOrWorkerGlobalScope
+ global, return the result of getting
+ the keys for global's map of active timers.
clearInterval(handle)
methods must
- clear the entry identified as handle from the list of active timers of the
- WindowOrWorkerGlobalScope
object on which the method was invoked, if any, where
- handle is the argument passed to the method. (If handle does not identify an
- entry in the list of active timers of the WindowOrWorkerGlobalScope
- object on which the method was invoked, the method does nothing.)
+ remove map of active timers[handle] of
+ the WindowOrWorkerGlobalScope
object on which the method was invoked, if any, where
+ handle is the argument passed to the method.
Because clearTimeout()
and clearInterval()
clear entries from the same list, either method
+ data-x="dom-clearInterval">clearInterval() clear entries from the same map, either method
can be used to clear timers created by setTimeout()
or setInterval()
.
If the entry for handle in the list of active timers has been - cleared, then abort these steps.
If handle does not exist in the + map of active timers, then abort these steps.
Run the appropriate set of steps from the following list:
@@ -96207,8 +96239,8 @@ enum DOMParserSupportedType {Let startTime be the current high resolution time.
Set the estimate next callback time algorithm for the entry in the - list of active timers associated with handle to the following steps:
+Set map of active timers[handle] to the + following steps:
The implementation-defined extra times allows implementation to extend the + length of timeout according to its own heuristics and optimizations.
Let now be the current high resolution time.
Empty the worker global scope's list of active timers.
+Clear the worker global scope's + map of active timers.