@@ -71,8 +71,8 @@ integrate the API into existing code that uses {{AbortSignal|AbortSignals}}.
71
71
<dt ><code >result = scheduler . {{Scheduler/postTask()|postTask}}( |callback|, |options| )</code ></dt >
72
72
<dd >
73
73
<p>Returns a promise that is fulfilled with the return value of |callback|,
74
- or rejected with an "{{AbortError!!exception}}" {{DOMException}} if the task
75
- is aborted. If |callback| throws an error during execution, the promise
74
+ or rejected with the {{AbortSignal}}'s [=AbortSignal/abort reason=] if the
75
+ task is aborted. If |callback| throws an error during execution, the promise
76
76
returned by {{Scheduler/postTask()}} will be rejected with that error.
77
77
78
78
<p>The task's {{TaskPriority|priority}} is determined by the combination of
@@ -115,7 +115,7 @@ task queue=]. This map is initialized to a new empty [=map=].
115
115
116
116
Note: We implement * dynamic prioritization* by enqueuing tasks associated with
117
117
a specific {{TaskSignal}} into the same [ =scheduler task queue=] , and changing
118
- that queue's priority in response to ` prioritychange ` events. The
118
+ that queue's priority in response to ` prioritychange ` events. The
119
119
[ =Scheduler/dynamic priority task queue map=] holds the
120
120
[ =scheduler task queues=] whose priorities can change, and the map key is the
121
121
{{TaskSignal}} which all tasks in the queue are associated with.
@@ -237,9 +237,9 @@ Processing Model {#sec-scheduling-tasks-processing-model}
237
237
1 . Let |signal| be |options|[ "{{SchedulerPostTaskOptions/signal}}"] if
238
238
|options|[ "{{SchedulerPostTaskOptions/signal}}"] [ =map/exists=] , or
239
239
otherwise null.
240
- 1 . If |signal| is not null and its [ =AbortSignal/aborted flag= ] is set , then
241
- [ =reject=] |result| with an "{{AbortError!!exception}}" {{DOMException}}
242
- and return |result|.
240
+ 1 . If |signal| is not null and it is [ =AbortSignal/aborted= ] , then
241
+ [ =reject=] |result| with |signal|'s [ =AbortSignal/abort reason= ] and return
242
+ |result|.
243
243
1 . Let |priority| be |options|[ "{{SchedulerPostTaskOptions/priority}}"] if
244
244
|options|[ "{{SchedulerPostTaskOptions/priority}}"] [ =map/exists=] , or
245
245
otherwise null.
@@ -321,7 +321,7 @@ to account for current throttling techniques (see also
321
321
1 . If |signal| is not null, then [ =AbortSignal/add|add the following=] abort
322
322
steps to it:
323
323
1 . [ =scheduler task queue/Remove=] |task| from |queue|.
324
- 1 . [ =Reject=] |result| with an "{{AbortError!!exception}}" {{DOMException}} .
324
+ 1 . [ =Reject=] |result| with |signal|'s [ =AbortSignal/abort reason= ] .
325
325
326
326
Issue: Because this algorithm can be called from [ =in parallel=] steps, parts
327
327
of this and other algorithms are racy. Specifically, the
0 commit comments