From 69b9e888d6b2a71c09c68915f8145dbd6ce8b8c2 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 9 Mar 2021 10:42:38 -0800 Subject: [PATCH 1/5] Add AbortSignal.aborted() static Returns an already aborted AbortSignal --- dom.bs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dom.bs b/dom.bs index 9029540c7..08ba90295 100644 --- a/dom.bs +++ b/dom.bs @@ -1780,12 +1780,16 @@ constructor steps are:
 [Exposed=(Window,Worker)]
 interface AbortSignal : EventTarget {
+  [NewObject] static AbortSignal abort();
+
   readonly attribute boolean aborted;
 
   attribute EventHandler onabort;
 };
+
AbortSignal . abort() +
Returns an {{AbortSignal}} instance whose aborted flag is set.
signal . aborted
Returns true if this {{AbortSignal}}'s {{AbortController}} has signaled to abort, and false otherwise. @@ -1817,6 +1821,16 @@ requirements to react in a reasonable way to {{AbortController/abort()}}. For ex [=AbortSignal/aborted flag=] might need to be propagated to a cross-thread environment, such as a service worker. +

The static abort() steps are: + +

    +
  1. Let signal be a new {{AbortSignal}} object. + +

  2. Set signal's [=AbortSignal/aborted flag=]. + +

  3. Return signal. +
+

The aborted getter steps are to return true if this's [=AbortSignal/aborted flag=] is set; otherwise false. From 7ed2987808563332b39ad5c750fa65d9e8ebbaa4 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 9 Mar 2021 10:43:50 -0800 Subject: [PATCH 2/5] Add myself to Acknolwedgements --- dom.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/dom.bs b/dom.bs index 08ba90295..6fc0cf5f8 100644 --- a/dom.bs +++ b/dom.bs @@ -10050,6 +10050,7 @@ Jake Archibald, Jake Verbaten, James Graham, James Greene, +James M Snell, James Robinson, Jeffrey Yasskin, Jens Lindström, From 9f6ba3c1ea82cf6dcc1f9c164b337ccec1cb7476 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 12 Mar 2021 09:56:00 +0100 Subject: [PATCH 3/5] Update dom.bs --- dom.bs | 1 + 1 file changed, 1 insertion(+) diff --git a/dom.bs b/dom.bs index 6fc0cf5f8..63566468c 100644 --- a/dom.bs +++ b/dom.bs @@ -1790,6 +1790,7 @@ interface AbortSignal : EventTarget {

AbortSignal . abort()
Returns an {{AbortSignal}} instance whose aborted flag is set. +
signal . aborted
Returns true if this {{AbortSignal}}'s {{AbortController}} has signaled to abort, and false otherwise. From ad33d53b76314461efe177137ed7bd29b5a2d73d Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 12 Mar 2021 09:56:37 +0100 Subject: [PATCH 4/5] Update dom.bs --- dom.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 63566468c..29e749385 100644 --- a/dom.bs +++ b/dom.bs @@ -1822,7 +1822,7 @@ requirements to react in a reasonable way to {{AbortController/abort()}}. For ex [=AbortSignal/aborted flag=] might need to be propagated to a cross-thread environment, such as a service worker. -

The static abort() steps are: +

The static abort() method steps are:

  1. Let signal be a new {{AbortSignal}} object. From 82f0e6c71e806986fc6cc0a84fe6f373b31cdfe0 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Fri, 12 Mar 2021 09:57:50 +0100 Subject: [PATCH 5/5] sigh --- dom.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom.bs b/dom.bs index 29e749385..dd4cc439a 100644 --- a/dom.bs +++ b/dom.bs @@ -1790,7 +1790,7 @@ interface AbortSignal : EventTarget {

    AbortSignal . abort()
    Returns an {{AbortSignal}} instance whose aborted flag is set. - +
    signal . aborted
    Returns true if this {{AbortSignal}}'s {{AbortController}} has signaled to abort, and false otherwise.