Streams Demo

When you press the button, the following happens:

  1. A text file is fetched as a ReadableStream and piped through a TextDecodeStream.
  2. A file handle is created and exposed as a WritableStream.
  3. The resulting decoded ReadableStream from step 1 is tee()ed into two ReadableStreams.
  4. The first ReadableStream is streamed into a <pre> displayed on the screen.
  5. The second ReadableStream is…