• Public
  • Public/Protected
  • All

Interface UnderlyingByteSource

An underlying byte source for constructing a ReadableStream.


  • UnderlyingByteSource



Optional autoAllocateChunkSize

autoAllocateChunkSize?: number

Can be set to a positive integer to cause the implementation to automatically allocate buffers for the underlying source code to write into. In this case, when a consumer is using a default reader, the stream implementation will automatically allocate an ArrayBuffer of the given size, so that controller.byobRequest is always present, as if the consumer was using a BYOB reader.

Optional cancel

{@inheritDoc UnderlyingSource.cancel}

Optional pull

{@inheritDoc UnderlyingSource.pull}

Optional start

{@inheritDoc UnderlyingSource.start}


type: "bytes"

Can be set to "bytes" to signal that the constructed ReadableStream is a readable byte stream. This ensures that the resulting ReadableStream will successfully be able to vend BYOB readers via its {@link ReadableStream.(getReader:1) | getReader()} method. It also affects the controller argument passed to the start() and pull() methods.

Generated using TypeDoc