whatwg / streams

Streams Standard
https://streams.spec.whatwg.org/
Other
1.34k stars 155 forks source link

Consider making writer.abort() automatically generate an "AbortError" DOMException? #1290

Open domenic opened 12 months ago

domenic commented 12 months ago

It's sad when people do writer.abort() with no arguments, because then the various promises (e.g., on any writer.write() calls, or writer.closed) reject with undefined.

Could we instead automatically generate an "AbortError" DOMException? That would match the behavior of AbortController.