Back to Content

TransformStreamDefaultController: terminate() method

files/en-us/web/api/transformstreamdefaultcontroller/terminate/index.md

latest558 B
Original Source

{{APIRef("Streams")}}{{AvailableInWorkers}}

The terminate() method of the {{domxref("TransformStreamDefaultController")}} interface closes the readable side and errors the writable side of the stream.

Syntax

js-nolint
terminate()

Parameters

None.

Return value

None ({{jsxref("undefined")}}).

Examples

In the below example the terminate() method is called on a {{domxref("TransformStreamDefaultController")}}.

js
controller.terminate();

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}