A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://developer.mozilla.org/en-US/docs/Web/API/WritableStreamDefaultController below:

WritableStreamDefaultController - Web APIs | MDN

WritableStreamDefaultController

Baseline Widely available *

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.signal Read only

Returns the AbortSignal associated with the controller.

Instance methods
WritableStreamDefaultController.error()

Causes any future interactions with the associated stream to error.

Examples
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 Browser compatibility

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4