| CARVIEW |
Select Language
HTTP/2 200
x-guploader-uploadid: AHVrFxMR4fiNCzaunGUwuPXu2zPg0dXYfSaiR8BwMTNgY2yrlKzKXZ3PJMY4c271OKGwFK_d
cache-control: public, max-age=3600
x-goog-hash: crc32c=Izm/sw==, md5=t+tSwLenahuLwQnxYhsq2Q==
x-cloud-trace-context: e2d46ea4ac3ffbe778abb7e2e4f5ac85
x-frame-options: DENY
via: 1.1 google, 1.1 varnish, 1.1 varnish, 1.1 varnish, 1.1 varnish
server: Google Frontend
expires: Sun, 28 Dec 2025 13:30:12 GMT
last-modified: Sun, 28 Dec 2025 01:10:09 GMT
x-goog-stored-content-length: 141612
x-goog-metageneration: 1
strict-transport-security: max-age=63072000
x-goog-meta-goog-reserved-file-mtime: 1766882816
x-content-type-options: nosniff
x-goog-storage-class: STANDARD
x-goog-stored-content-encoding: identity
origin-trial: AxVILwizhbMjxFeHOn1P3R8niO1RJY/smaK4B4d1rLzc1gTaxtXMSaTi+FoigYgCw40uFRDwFcEAeqDR+vVLOW4AAABfeyJvcmlnaW4iOiJodHRwczovL2RldmVsb3Blci5tb3ppbGxhLm9yZyIsImZlYXR1cmUiOiJQcml2YXRlQXR0cmlidXRpb25WMiIsImV4cGlyeSI6MTc0MjA3OTYwMH0=
content-type: text/html
referrer-policy: strict-origin-when-cross-origin
content-security-policy: default-src 'self'; script-src 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://*.googletagmanager.com assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; script-src-elem 'report-sample' 'self' 'wasm-unsafe-eval' https://www.google-analytics.com/analytics.js https://*.googletagmanager.com assets.codepen.io production-assets.codepen.io https://js.stripe.com 'sha256-XNBp89FG76amD8BqrJzyflxOF9PaWPqPqvJfKZPCv7M=' 'sha256-YCNoU9DNiinACbd8n6UPyB/8vj0kXvhkOni9/06SuYw=' 'sha256-PZjP7OR6mBEtnvXIZfCZ5PuOlxoDF1LDZL8aj8c42rw='; style-src 'report-sample' 'self' 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' developer.allizom.org bcd.developer.allizom.org bcd.developer.mozilla.org updates.developer.allizom.org updates.developer.mozilla.org https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https://incoming.telemetry.mozilla.org https://observatory-api.mdn.allizom.net https://observatory-api.mdn.mozilla.net https://api.github.com/search/issues stats.g.doubleclick.net https://api.stripe.com; font-src 'self'; frame-src 'self' mdn.github.io *.mdnplay.dev *.mdnyalp.dev *.play.test.mdn.allizom.net https://v2.scrimba.com https://scrimba.com jsfiddle.net www.youtube-nocookie.com codepen.io survey.alchemer.com https://js.stripe.com; img-src 'self' data: *.githubusercontent.com *.googleusercontent.com *.gravatar.com mozillausercontent.com firefoxusercontent.com profile.stage.mozaws.net profile.accounts.firefox.com developer.mozilla.org mdn.dev wikipedia.org upload.wikimedia.org https://mdn.github.io/shared-assets/ https://mdn.dev/ https://*.google-analytics.com https://*.googletagmanager.com www.gstatic.com; manifest-src 'self'; media-src 'self' archive.org videos.cdn.mozilla.net https://mdn.github.io/shared-assets/; child-src 'self'; worker-src 'self';
etag: "b7eb52c0b7a76a1b8bc109f1621b2ad9"
x-goog-generation: 1766884209881736
content-encoding: gzip
accept-ranges: bytes
age: 2889
date: Sun, 28 Dec 2025 13:18:21 GMT
x-served-by: cache-bfi-krnt7300063-BFI, cache-bfi-krnt7300063-BFI, cache-sin-wsss1830084-SIN, cache-bom-vanm7210057-BOM
x-cache: MISS, MISS, HIT, MISS
x-cache-hits: 0, 0, 1, 0
x-timer: S1766927901.480258,VS0,VE53
vary: Accept-Encoding
content-length: 18917
WritableStreamDefaultController - Web APIs | MDN
Toggle sidebar
>
WritableStreamDefaultController
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since May 2022.
Note: This feature is available in Web Workers.
The WritableStreamDefaultController interface of the Streams API represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
Constructor
None. WritableStreamDefaultController instances are created automatically during WritableStream construction.
Instance properties
WritableStreamDefaultController.signalRead only-
Returns the
AbortSignalassociated with the controller.
Instance methods
WritableStreamDefaultController.error()-
Causes any future interactions with the associated stream to error.
Examples
js
const writableStream = new WritableStream({
start(controller) {
// do stuff with controller
// error stream if necessary
controller.error("My stream is broken");
},
write(chunk, controller) {
// …
},
close(controller) {
// …
},
abort(err) {
// …
},
});
Specifications
| Specification |
|---|
| Streams> # ws-default-controller-class> |