diff --git a/dom.bs b/dom.bs index 5e04fed6..b07dcd9c 100644 --- a/dom.bs +++ b/dom.bs @@ -1729,6 +1729,8 @@ interface AbortController { [SameObject] readonly attribute AbortSignal signal; undefined abort(optional any reason); + + undefined close(); }; @@ -1745,6 +1747,13 @@ interface AbortController { [=AbortSignal/abort reason=], and signal to any observers that the associated activity is to be aborted. If reason is undefined, then an "{{AbortError!!exception}}" {{DOMException}} will be stored. + +
controller . close()
+ true
, indicating that the {{AbortController}} is abandoning the {{AbortSignal}} and
+ will not signal to any observers that associated activity is to be aborted. As a result, the {
+ {AbortSignal}} will Remove all event listeners whose set of event types to handle contains
+ abort.
An {{AbortController}} object has an associated signal (an @@ -1767,6 +1776,8 @@ constructor steps are: to signal abort on this's signal with reason if it is given. +
The signal close on this's closed
+ An {{AbortSignal}} object is aborted when its
[=AbortSignal/abort reason=] is not undefined.
+ An {{AbortSignal}} object is closed when its
+[=AbortSignal/closed=] is true.
+
An {{AbortSignal}} object has associated abort algorithms, which is a
set of algorithms which are to be executed when it is [=AbortSignal/aborted=]. Unless
specified otherwise, its value is the empty set.
@@ -1809,6 +1828,8 @@ object signal, run these steps:
If signal is [=AbortSignal/aborted=], then return.
+ If signal is [=AbortSignal/closed=], then return.
+
Append algorithm to signal's
abort algorithms.
The aborted getter steps are to return true if this
is [=AbortSignal/aborted=]; otherwise false.
+ The closed getter steps are to return true if this
+is [=AbortSignal/closed=]; otherwise false.
+
The reason getter steps are to return this's
abort reason.
@@ -1855,6 +1879,8 @@ them. For instance, if the operation has already completed.
If signal is [=AbortSignal/aborted=], then return.
+ If signal is [=AbortSignal/closed=], then return.
+
Set signal's [=AbortSignal/abort reason=] to reason if it is given;
otherwise to a new "{{AbortError!!exception}}" {{DOMException}}.
@@ -1866,6 +1892,23 @@ them. For instance, if the operation has already completed.
[=Fire an event=] named {{AbortSignal/abort}} at signal.
To signal close, given an {{AbortSignal}} object
+signal, run these steps:
+
+ If signal is [=AbortSignal/aborted=], then return.
+
+ If signal is [=AbortSignal/closed=], then return.
+
+ Set signal's [=AbortSignal/closed=] to true.
+
+ Remove all of signal's abort algorithms.
+ Closing an {{AbortSignal}} enables explicitly indicating that there is no further
+reason to expect the {{AbortController}} to signal abort on its
+{{AbortSignal}}, and that the signal can be safely ignored.
+
A followingSignal (an {{AbortSignal}}) is made to
follow a parentSignal (an {{AbortSignal}}) by running
these steps:
@@ -1873,6 +1916,11 @@ these steps:
If followingSignal is [=AbortSignal/aborted=], then return.
+ If followingSignal is [=AbortSignal/closed=], then return.
+
+ If parentSignal is [=AbortSignal/closed=], then
+ signal close on followingSignal.
+
If parentSignal is [=AbortSignal/aborted=], then
signal abort on followingSignal with parentSignal's
[=AbortSignal/abort reason=].
signal . reason
@@ -1837,6 +1858,9 @@ are:
+
+
+
+