@@ -246,34 +246,18 @@ Processing Model {#sec-scheduling-tasks-processing-model}
246246 1 . Let |queue| be the result of [ =selecting the scheduler task queue=] for
247247 |scheduler| given |signal| and |priority|.
248248 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 [ =wait for a timeout=] given
250+ |scheduler|'s [ =relevant global object=] , "` scheduler-postTask ` ",
251+ |delay|, and the following steps:
264252 1 . [ =Schedule a task to invoke a callback=] for |scheduler| given |queue|,
265253 |signal|, |callback|, and |result|.
266254 1 . Otherwise, [ =schedule a task to invoke a callback=] for |scheduler| given
267255 |queue|, |signal|, |callback|, and |result|.
268256 1 . Return |result|.
269257</div >
270258
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: [ =wait for a timeout=] doesn't necessarily account for suspension; see
260+ [ whatwg/html #5925 ] ( https://github.com/whatwg/html/issues/5925 ) .
277261
278262<div algorithm =" select the scheduler task queue " >
279263 To <dfn lt =" select the scheduler task queue|selecting the scheduler task queue " >select the scheduler task queue</dfn >
0 commit comments