Web APIs
WritableStreamDefaultWriter.prototype.ready
Promise that fulfills when the writer is no longer experiencing backpressure; may reject if the stream errors.
Formal Syntax & Structure
javascript syntaxjavascript
writer.readyReturn Value
Promise<undefined>
Promise that fulfills when the writer is no longer experiencing backpressure; may reject if the stream errors.
Working Example
Example Snippetjavascript
(async () => {const s=new WritableStream({write(){}});const w=s.getWriter();await w.ready;await w.write(1);await w.ready;console.log(w.desiredSize);await w.close();w.releaseLock();})()