WritableStream.getWriter()
The getWriter() method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
While the stream is locked, no other writer can be acquired until this one is released.
Syntax
getWriter()
Parameters
None.
Return value
A WritableStreamDefaultWriter object instance.
Exceptions
TypeError- : The stream you are trying to create a writer for is not a
WritableStream.
- : The stream you are trying to create a writer for is not a