diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 55b27584361e1c..5108c80d4303cf 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -106,6 +106,26 @@ For more details refer to the relevant documentation: ## API +### `ReadableStreamTee(stream[, cloneForBranch2])` + + + +* `stream` {ReadableStream} +* `cloneForBranch2` {boolean} When `true`, chunks enqueued into the second + branch are cloned from chunks enqueued into the first branch. **Default:** + `false`. +* Returns: {ReadableStream\[]} Two {ReadableStream} branches. + +Runs the WHATWG `ReadableStreamTee` abstract operation on `stream`. + +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. + ### Class: `ReadableStream`