This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2022.
Note: This feature is available in Web Workers.
The terminate() method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
terminate()
None.
None (undefined).
In the below example the terminate() method is called on a TransformStreamDefaultController.
controller.terminate();
| Specification |
|---|
| Streams> # ts-default-controller-terminate> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
terminate |
67 | 79 | 102 | 54 | 14.1 | 67 | 102 | 48 | 14.5 | 9.0 | 67 | 14.5 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/TransformStreamDefaultController/terminate