← Back to release summary

WritableStream controller AbortSignal

Category
Network / Connectivity
Type
No developer-visible change
Status
Enabled by default (Chrome 98)
Intent stage
Prepare to ship

Summary

The streams APIs provide ubiquitous, interoperable primitives for creating, composing, and consuming streams of data. This change permits an underlying sink to rapidly abort an ongoing write or close when requested by the writer.

Motivation

Previously, when writer.abort() was called, a long-running write would still have to continue to completion before the stream could be aborted. With this change, the write can be aborted immediately. In addition to being exposed to streams authored in JavaScript, this facility will also be used by platform-provided streams such as WebTransport.

Standards & signals

Explainers: https://github.com/nidhijaju/streams/blob/abort-signal-explainer/writable-stream-abort-signal-explainer.md

View on chromestatus.com