diff --git a/dom.bs b/dom.bs index f833ab643..19bb0d18d 100644 --- a/dom.bs +++ b/dom.bs @@ -1478,6 +1478,10 @@ controller.abort();
function doAmazingness({signal}) {
+ if (signal.aborted) {
+ return Promise.reject(new DOMException('Aborted', 'AbortError'));
+ }
+
return new Promise((resolve, reject) => {
// Begin doing amazingness, and call resolve(result) when done.
// But also, watch for signals: