Re: [whatwg/streams] WritableStreamDefaultController.abortReason (#1165)

> Should the `abort` event fired by an `AbortSignal` also carry an `abortReason` property? That is: instead of "fire an event named `abort`" in step 5 of [signal abort](https://dom.spec.whatwg.org/#abortsignal-signal-abort), we introduce an `AbortEvent` that has an `abortReason` and fire that event instead.

Never mind, `event.target.abortReason` (or `.reason` as Domenic named it) would work just as well. 😅

> calling `.abort(x)` causes methods like `fetch()` to reject with `x` instead of with an `"AbortError"` `DOMException`, then it would be good.

Hmm, I was a bit hesitant about changing the rejection reason of `fetch()` itself, hence the suggestion for using `.cause`. But sure, if we want to make this consistent across all standards, then rejecting with the given reason makes the most sense.

-- 
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/streams/issues/1165#issuecomment-920132820

Received on Wednesday, 15 September 2021 15:39:50 UTC