Skip to main content
Version: 3.13.0

TransformStreamDefaultController.enqueue()

The enqueue() method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.

Syntax

enqueue(chunk)

Parameters

  • chunk
    • : The chunk being queued. A chunk is a single piece of data. It can be any type of data, and a stream can contain chunks of different types.

Return value

None undefined.

Exceptions

  • TypeError
    • : The stream is not readable. This might occur if the stream is errored via controller.error(), or when it is closed without its controller's controller.close() method ever being called.