Web APIs
WritableStream.prototype.getWriter()
Acquires a writer and locks a writable stream.
Formal Syntax & Structure
javascript syntaxjavascript
stream.getWriter()Return Value
WritableStreamDefaultWriter
Acquires a writer and locks a writable stream.
Working Example
Example Snippetjavascript
(async () => {const s=new WritableStream();const w=s.getWriter();console.log(s.locked);w.releaseLock();console.log(s.locked);})()