Re: [whatwg/dom] Add abort reason to AbortSignal (PR #1027)

@domenic commented on this pull request.



>    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>AbortSignal . <a method for=AbortSignal>abort</a>(reason)</code>
+ <dd>Returns an {{AbortSignal}} instance whose <a for=AbortSignal>aborted flag</a> is set, and
+ <a for=AbortSignal>abort reason</a> is set to <var>reason</var> if provided, otherwise to an
+ "{{AbortError!!exception}}" {{DOMException}}.
+
+ <dt><code><var>signal</var> . <a attribute for=AbortSignal>reason</a></code>
+ <dd>Returns the <a for=AbortSignal>abort reason</a> for an {{AbortSignal}}; by default this will
+ be an "{{AbortError!!exception}}" {{DOMException}}.

Yeah, I forgot about this too. Maybe just keep it simple as `Returns <var>signal</var>'s <a for=AbortSignal>abort reason</a>.`.

-- 
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#discussion_r733754679

Received on Thursday, 21 October 2021 14:42:40 UTC