diff --git a/dom.bs b/dom.bs index b47aebc0..653f54ce 100644 --- a/dom.bs +++ b/dom.bs @@ -30,6 +30,7 @@ type: interface urlPrefix: https://tc39.es/ecma262/#; spec: ECMASCRIPT text: Construct; url: sec-construct; type: abstract-op type: dfn + text: current realm; url: current-realm text: realm; url: realm text: surrounding agent; url: surrounding-agent urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME @@ -1830,45 +1831,30 @@ interface AbortSignal : EventTarget { {{AbortController}} has signaled to abort; otherwise, does nothing. -
An {{AbortSignal}} object has an associated abort reason, which is a -JavaScript value. It is undefined unless specified otherwise. +
An {{AbortSignal}} object has an associated abort reason (a +JavaScript value), which is initially undefined. -
An {{AbortSignal}} object is aborted when its -[=AbortSignal/abort reason=] is not undefined. +
An {{AbortSignal}} object has associated abort algorithms, (a +set of algorithms which are to be executed when it is [=AbortSignal/aborted=]), +which is initially empty. -
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. +
The [=AbortSignal/abort algorithms=] enable APIs with complex +requirements to react in a reasonable way to {{AbortController/abort()}}. For example, a given API's +[=AbortSignal/abort reason=] might need to be propagated to a cross-thread environment, such as a +service worker.
An {{AbortSignal}} object has a composite (a boolean), which is initially false. -
An {{AbortSignal}} object has associated source signals, which is a -set of weak references to {{AbortSignal}} objects that the object is dependent on for -its [=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set. +
An {{AbortSignal}} object has associated source signals, (a weak +set of {{AbortSignal}} objects that the object is dependent on for its +[=AbortSignal/aborted=] state), which is initially empty. -
An {{AbortSignal}} object has associated dependent signals, which is a -set of weak references to {{AbortSignal}} objects that are dependent on it for their -[=AbortSignal/aborted=] state. Unless specified otherwise, its value is the empty set. +
An {{AbortSignal}} object has associated dependent signals (a weak +set of {{AbortSignal}} objects that are dependent on the obejct for their +[=AbortSignal/aborted=] state), which is initially empty. -
To add an algorithm algorithm to an {{AbortSignal}} -object signal, run these steps: - -
If signal is [=AbortSignal/aborted=], then return. - -
Append algorithm to signal's - abort algorithms. -
To remove an algorithm algorithm from an -{{AbortSignal}} signal, remove algorithm from -signal's abort algorithms. - -
The [=AbortSignal/abort algorithms=] enable APIs with complex -requirements to react in a reasonable way to {{AbortController/abort()}}. For example, a given API's -[=AbortSignal/abort reason=] might need to be propagated to a cross-thread environment, such as a -service worker. +
The static abort(reason)
method steps
are:
@@ -1909,7 +1895,7 @@ steps are:
The static any(signals)
method
steps are to return the result of creating a composite abort signal from signals
-using {{AbortSignal}}.
+using {{AbortSignal}} and the current realm.
The aborted getter steps are to return true if this is [=AbortSignal/aborted=]; otherwise false. @@ -1951,8 +1937,27 @@ is [=AbortSignal/aborted=]; otherwise false. {{AbortController}} object, but an API observing the {{AbortSignal}} object can choose to ignore them. For instance, if the operation has already completed. +
An {{AbortSignal}} object is aborted when its +[=AbortSignal/abort reason=] is not undefined. + +
To add an algorithm algorithm to an {{AbortSignal}} +object signal: + +
If signal is [=AbortSignal/aborted=], then return. + +
Append algorithm to signal's + abort algorithms. +
To remove an algorithm algorithm from an +{{AbortSignal}} signal, remove algorithm from +signal's abort algorithms. +
To signal abort, given an {{AbortSignal}} object signal and -an optional reason, run these steps: +an optional reason:
If signal is [=AbortSignal/aborted=], then return. @@ -1974,16 +1979,12 @@ an optional reason, run these steps:
To create a composite abort signal from a list of {{AbortSignal}} objects signals, using signalInterface, which must be either {{AbortSignal}} or an -interface that inherits from it, and an optional realm, run these steps: +interface that inherits from it, and a realm:
Let resultSignal be a new object implementing - signalInterface using realm if given, otherwise using the default behavior - defined in Web IDL. - -
As of the time of this writing Web IDL does not yet define any default behavior; - see whatwg/webidl#135. + signalInterface using realm.
Set resultSignal's [=AbortSignal/composite=] to true. @@ -3539,6 +3540,7 @@ dictionary MutationObserverInit {