Skip to main content

WritableStreamDefaultController

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.

MDN Reference

Methods

error()

error(e?): void;

The error() method of the WritableStreamDefaultController interface causes any future interactions with the associated stream to error.

MDN Reference

Parameters

ParameterType
e?any

Returns

void

Properties

signal

readonly signal: AbortSignal;

The read-only signal property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.

MDN Reference