diff --git a/index.html b/index.html
index b0060bf..ccd0f24 100644
--- a/index.html
+++ b/index.html
@@ -83,7 +83,8 @@
Dependencies
The terms browsing context
- , event loop,
+ , similar-origin
+ window agent, event loop,
event loop processing
model, spin the event
loop, fully active,
@@ -341,19 +342,25 @@
Window interface extensions
Each Window has:
- - A list of idle request callbacks. The list MUST be
- initially empty and each entry in this list is identified by a number,
- which MUST be unique within the list for the lifetime of the
Window
- object.
- - A list of runnable idle callbacks. The list MUST be
- initially empty and each entry in this list is identified by a number,
- which MUST be unique within the list of the lifetime of the
Window
- object.
- An idle callback identifier, which is a number which MUST
initially be zero.
+
+
+ In addition, each similar-origin window agent has:
+
+ - A list of idle request callbacks. The list MUST be
+ initially empty and each entry in this list is identified by Window
+ and a number, the combination of which MUST be unique within the list for
+ the lifetime of the similar-origin window agent.
+ - A list of runnable idle callbacks. The list MUST be
+ initially empty and each entry in this list is identified by a
+ Window and a number, the combination of which which MUST be unique
+ within the list for the lifetime of the similar-origin window agent.
+
- A last idle period deadline, which is a
DOMHighResTimeStamp which MUST initially be zero.
+
The requestIdleCallback
method
@@ -367,8 +374,11 @@ The requestIdleCallback
by one.
Let handle be the current value of window's
idle callback identifier.
- Push callback to the end of window's list
- of idle request callbacks, associated with handle.
+ Let agent be the similar-origin window agent
+ associated with window
+ Push callback to the end of agent's
+ list of idle request callbacks, associated with handle
+ and window.
Return handle and then continue running this algorithm
asynchronously.
The following steps run in parallel and queue a timer
@@ -421,11 +431,13 @@
The cancelIdleCallback
- Let window be this
Window object.
- - Find the entry in either the window's list of idle
+
- Let agent be the similar-origin window agent
+ associated with window
+ - Find the entry in either the agent's list of idle
request callbacks or list of runnable idle callbacks that is
- associated with the value handle.
+ associated with the value handle and window.
- - If there is such an entry, remove it from both window's
+
- If there is such an entry, remove it from both agent's
list of idle request callbacks and the list of runnable idle
callbacks.
@@ -475,11 +487,12 @@ Processing
Start an idle period algorithm
The start an idle period algorithm, which is called
- by the event loop processing model when it determines that
- the event loop is otherwise idle:
+ by the event loop processing model, when it determines that
+ the event loop is otherwise idle, passing a similar-origin
+ window agent as the argument agent:
- Let last_deadline be the last idle period deadline
- associated with window
+ associated with agent
- If last_deadline is greater than the current time,
return from this algorithm.
- Optionally, if the user agent determines the idle period should
@@ -509,11 +522,11 @@
Start an idle period algorithm
responsiveness to new user input within the threshold of human
perception.
- - Let pending_list be window's list of idle
- request callbacks.
+
- Let pending_list be agent's list of
+ idle request callbacks.
- - Let run_list be window's list of runnable
- idle callbacks.
+
- Let run_list be agent's list of
+ runnable idle callbacks.
- Append all entries from pending_list into
run_list preserving order.
@@ -521,19 +534,20 @@ Start an idle period algorithm
- Queue a task on the queue associated with the idle-task
task source, which performs the steps defined in the invoke
idle callbacks algorithm with deadline and
- window as parameters.
+ agent as parameters.
- Save deadline as the last idle period deadline
- associated with window.
+ associated with agent.
The task source for these tasks is the idle-task
task source.
The time between now and deadline is referred
to as the idle period. There can only be one idle period
- active at a given time for any given window. The idle period can end
- early if the user agent determines that it is no longer idle. If so,
- the next idle period cannot start until after deadline.
+ active at a given time for any given
similar-origin window agent.
+ The idle period can end early if the user agent determines that it is no
+ longer idle. If so, the next idle period cannot start until after
+
deadline.