- From: Scott Haseley <notifications@github.com>
- Date: Wed, 12 Apr 2023 10:29:20 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 12 April 2023 17:29:26 UTC
@shaseley commented on this pull request. > them. For instance, if the operation has already completed. -<p>To <dfn export for=AbortSignal>signal abort</dfn>, given an {{AbortSignal}} object -<var>signal</var> and an optional <var>reason</var>, run these steps: +<hr> + +<p>An {{AbortSignal}} object is <dfn export for="AbortSignal">aborted</dfn> when its +[=AbortSignal/abort reason=] is not undefined. Ah, yeah I had to double check this when drafting this (note: this PR isn't changing this behavior, only reorganizing the sections per review comments; this was added/changed in https://github.com/whatwg/dom/pull/1027). [signal abort](https://dom.spec.whatwg.org/#abortsignal-signal-abort)'s reason parameter is optional, and it gets set to a new "AbortError" DOMException if a reason isn't given (which includes undefined). So doing something like `controller.abort(undefined)` will result in `controller.signal.reason` being a DOMException ([wpt test](https://github.com/web-platform-tests/wpt/blob/master/dom/abort/event.any.js#L111)). . -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/dom/pull/1152#discussion_r1164439269 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/dom/pull/1152/review/1381787490@github.com>
Received on Wednesday, 12 April 2023 17:29:26 UTC