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 thisReadableStreamwill not causedestinationto be aborted. -
preventCancel<boolean> 当true时,destination中的错误不会导致此ReadableStream被取消。¥
preventCancel<boolean> Whentrue, errors in thedestinationwill not cause thisReadableStreamto be canceled. -
preventClose<boolean>true时,关闭这个ReadableStream不会导致destination关闭。¥
preventClose<boolean> Whentrue, closing thisReadableStreamdoes not causedestinationto 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.