Web APIs
WritableStreamDefaultWriter.desiredSize
Reports remaining queue capacity according to the queuing strategy, not bytes unless the strategy counts bytes. May be null for an errored stream.
Formal Syntax & Structure
javascript syntaxjavascript
writer.desiredSizeReturn Value
number | null
Desired additional queue size.
Working Example
Example Snippetjavascript
const w=new WritableStream({}, {highWaterMark:3}).getWriter(); console.log(w.desiredSize); w.releaseLock();