Skip to main content
Version: 3.27.2

respond()

The respond() method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.

After this method is called, the view will be transferred and no longer modifiable.

Syntax

respond(bytesWritten)

Parameters

  • bytesWritten
    • : The number of bytes written into ReadableStreamBYOBRequest.view.

Return value

undefined.

Exceptions

  • TypeError
    • : The request does not have an associated ReadableByteStreamController or the view buffer is not detached/cannot be transferred into.