- From: Domenic Denicola <notifications@github.com>
- Date: Wed, 20 Oct 2021 12:43:37 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 20 October 2021 19:43:50 UTC
@domenic commented on this pull request.
The main logic looks great now.
I'm still interested to gather more opinions on `reason` vs. `abortReason`... maybe @jasnell can help represent other-ecosystems perspectives.
>    attribute EventHandler onabort;
 };</pre>
 
 <dl class=domintro>
  <dt><code>AbortSignal . <a method for="AbortSignal">abort()</a></code>
  <dd>Returns an {{AbortSignal}} instance whose <a for=AbortSignal>aborted flag</a> is set.
 
+ <dt><code><var>signal</var> . <a attribute for=AbortSignal>reason</a></code>
+ <dd>Returns the <a for=AbortSignal>abort reason</a> for an {{AbortSignal}} if it has been
+ set; otherwise returns an "{{AbortError!!exception}}" {{DOMException}}.
Maybe `by default this will be an "AbortError" DOMException`?
> @@ -1775,13 +1776,19 @@ interface AbortSignal : EventTarget {
 
   readonly attribute boolean aborted;
 
+  readonly attribute any reason;
+
   attribute EventHandler onabort;
 };</pre>
 
We should probably update the static `abort()` method to also accept a reason.
-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1027#pullrequestreview-784922196
Received on Wednesday, 20 October 2021 19:43:50 UTC