diff --git a/dom.bs b/dom.bs index 70e029a6..94217174 100644 --- a/dom.bs +++ b/dom.bs @@ -1926,6 +1926,7 @@ interface AbortSignal : EventTarget { readonly attribute boolean aborted; readonly attribute any reason; undefined throwIfAborted(); + undefined addAbortCallback(VoidFunction callback); attribute EventHandler onabort; }; @@ -2037,6 +2038,26 @@ is [=AbortSignal/aborted=]; otherwise false.
The throwIfAborted() method steps are to throw this's abort reason, if this is [=AbortSignal/aborted=]. +
The addAbortCallback(callback) method steps are:
+
+
This method is primarily useful for when functions accepting {{AbortSignal}}s want to throw (or return a rejected promise) at specific checkpoints, instead of passing along the {{AbortSignal}}