new WritableStream([underlyingSink[, strategy]])
-
underlyingSink
<Object>-
start
<Function> 创建WritableStream
时立即调用的用户定义函数。¥
start
<Function> A user-defined function that is invoked immediately when theWritableStream
is created.-
controller
<WritableStreamDefaultController> -
返回:
undefined
或用undefined
实现的 promise。¥Returns:
undefined
or a promise fulfilled withundefined
.
-
-
write
<Function> 将数据块写入WritableStream
时调用的用户定义函数。¥
write
<Function> A user-defined function that is invoked when a chunk of data has been written to theWritableStream
.-
chunk
<any> -
controller
<WritableStreamDefaultController> -
返回:
undefined
兑现的 promise。¥Returns: A promise fulfilled with
undefined
.
-
-
close
<Function>WritableStream
关闭时调用的用户定义函数。¥
close
<Function> A user-defined function that is called when theWritableStream
is closed.-
返回:
undefined
兑现的 promise。¥Returns: A promise fulfilled with
undefined
.
-
-
abort
<Function> 调用以突然关闭WritableStream
的用户定义函数。¥
abort
<Function> A user-defined function that is called to abruptly close theWritableStream
.-
reason
<any> -
返回:
undefined
兑现的 promise。¥Returns: A promise fulfilled with
undefined
.
-
-
type
<any>type
选项保留供将来使用,必须未定义。¥
type
<any> Thetype
option is reserved for future use and must be undefined.
-
-
strategy
<Object>-
highWaterMark
<number> 应用背压之前的最大内部队列大小。¥
highWaterMark
<number> The maximum internal queue size before backpressure is applied. -
size
<Function> 一个用户定义的函数,用于标识每个数据块的大小。¥
size
<Function> A user-defined function used to identify the size of each chunk of data.
-