Function fromDOMStream

  • Creates an async-iterable from an existing DOM stream.

    Type Parameters

    • TSource

      The type of elements in the source DOM stream.

    Parameters

    • stream: ReadableStream<TSource>

      The DOM Readable stream to convert to an async-iterable.

    Returns AsyncIterable<TSource>

    An async-iterable containing the elements from the ReadableStream.

  • Creates an async-iterable from an existing DOM stream and options.

    Type Parameters

    • TSource extends ArrayBufferView

      The type of elements in the source DOM stream.

    Parameters

    • stream: ReadableStream<TSource>

      The readable stream to convert to an async-iterable.

    • options: {
          mode: "byob";
      }

      The options to set the mode for the DOM stream.

      • mode: "byob"

    Returns AsyncIterable<TSource>

    An async-iterable created from the incoming async-iterable.

Generated using TypeDoc