ReadableStreamTee(stream[, cloneForBranch2])


稳定性: 1 - 实验性

stream 上运行 WHATWG 的 ReadableStreamTee 抽象操作。

🌐 Runs the WHATWG ReadableStreamTee abstract operation on stream.

只有当 cloneForBranch2true 时,这与 readableStream.tee() 才会不同。tee() 方法总是传递 false,而其他网页平台规范,比如 Fetch body 克隆,会传递 true,这样第二个分支就会收到克隆的块,并且一个分支的使用不会改变另一个分支看到的块。

🌐 This differs from readableStream.tee() only when cloneForBranch2 is true. The tee() method always passes false, while other web platform specifications, such as Fetch body cloning, pass true so that the second branch receives cloned chunks and consumption of one branch cannot mutate chunks seen by the other.