readableStream.pipeTo(destination[, options])
-
destination
<WritableStream> 将写入此ReadableStream
的数据的 <WritableStream>。¥
destination
<WritableStream> A <WritableStream> to which thisReadableStream
's data will be written. -
options
<Object>-
preventAbort
<boolean> 当true
时,此ReadableStream
中的错误不会导致destination
中止。¥
preventAbort
<boolean> Whentrue
, errors in thisReadableStream
will not causedestination
to be aborted. -
preventCancel
<boolean> 当true
时,destination
中的错误不会导致此ReadableStream
被取消。¥
preventCancel
<boolean> Whentrue
, errors in thedestination
will not cause thisReadableStream
to be canceled. -
preventClose
<boolean>true
时,关闭这个ReadableStream
不会导致destination
关闭。¥
preventClose
<boolean> Whentrue
, closing thisReadableStream
does not causedestination
to be closed. -
signal
<AbortSignal> 允许使用 <AbortController> 取消数据传输。¥
signal
<AbortSignal> Allows the transfer of data to be canceled using an <AbortController>.
-
-
返回:
undefined
兑现的 promise¥Returns: A promise fulfilled with
undefined
当管道操作处于活动状态时,使 readableStream.locked
变为 true
。
¥Causes the readableStream.locked
to be true
while the pipe operation
is active.