TransformStreamDefaultController.terminate()

Invalid slug for templ/sidebar: Streams API

TransformStreamDefaultController 接口的 terminate() 方法用于关闭流的可读端并且会使流的可写端出错。

语法

js
terminate()

参数

无。

返回值

无(undefined)。

示例

在以下示例中,调用了 TransformStreamDefaultControllerterminate() 方法。

js
controller.terminate();

规范

Specification
Streams
# ts-default-controller-terminate

浏览器兼容性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
terminate

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support