@@ -246,34 +246,18 @@ Processing Model {#sec-scheduling-tasks-processing-model}
246
246
1 . Let |queue| be the result of [ =selecting the scheduler task queue=] for
247
247
|scheduler| given |signal| and |priority|.
248
248
1 . Let |delay| be |options|[ "{{SchedulerPostTaskOptions/delay}}"] .
249
- 1 . If |delay| is greater than 0, then run these steps [ =in parallel=] :
250
- 1 . Let |global| be the [ =relevant global object=] for |scheduler|.
251
- 1 . If |global| is a {{Window}} object, wait until |global|'s
252
- <a attribute for =" Window " >associated <code >Document</code ></a >
253
- has been [ =Document/fully active=] for a further |delay| milliseconds (not necessarily
254
- consecutively).
255
-
256
- Otherwise, |global| is a {{WorkerGlobalScope}} object; wait until |delay|
257
- milliseconds have passed with the worker not suspended (not necessarily
258
- consecutively).
259
-
260
- 1 . Wait until any invocations of this algorithm that had the same |scheduler|,
261
- that started before this one, and whose |delay| is equal to or less
262
- than this one's, have completed.
263
- 1 . Optionally, wait a further [ =implementation-defined=] length of time.
249
+ 1 . If |delay| is greater than 0, then [ =run steps after a timeout=] given
250
+ |scheduler|'s [ =relevant global object=] , "` scheduler-postTask ` ",
251
+ |delay|, and the following steps:
264
252
1 . [ =Schedule a task to invoke a callback=] for |scheduler| given |queue|,
265
253
|signal|, |callback|, and |result|.
266
254
1 . Otherwise, [ =schedule a task to invoke a callback=] for |scheduler| given
267
255
|queue|, |signal|, |callback|, and |result|.
268
256
1 . Return |result|.
269
257
</div >
270
258
271
- Issue: We need to figure out exactly how we want to spec delayed tasks, and if
272
- we can refactor the timer spec to use a common method. As written, this uses
273
- steps 15&ndash ; 17 of the timer initialization steps algorithm, but there are a
274
- couple things we might want to change: (1) how to account for suspend? (2) how
275
- to account for current throttling techniques (see also
276
- [ this issue] ( https://github.com/whatwg/html/issues/5925 ) )?
259
+ Issue: [ =Run steps after a timeout=] doesn't necessarily account for suspension;
260
+ see [ whatwg/html #5925 ] ( https://github.com/whatwg/html/issues/5925 ) .
277
261
278
262
<div algorithm =" select the scheduler task queue " >
279
263
To <dfn lt =" select the scheduler task queue|selecting the scheduler task queue " >select the scheduler task queue</dfn >
0 commit comments