close()
The close()
method of the ReadableByteStreamController
interface closes the associated stream.
This might be called by the underlying source when its data source has been exhausted/completed.
Note: Readers will still be able to read any previously-enqueued chunks from the stream, but once those are read, the stream will become closed. However if there is an outstanding and partially written
byobRequest
whenclose()
is called, the stream will be errored.
Syntax
close()
Parameters
None.
Return value
undefined
.
Exceptions
TypeError
- : Thrown if the source object is not a
ReadableByteStreamController
, it is already closed, or the stream is not readable for some other reason.
- : Thrown if the source object is not a