const queuingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });
const writableStream = new WritableStream(
{
// Implement the sink
write(chunk) {
// …
},
close() {
// …
},
abort(err) {
console.log("Sink error:", err);
},
},
queuingStrategy,
);
const size = queuingStrategy.size();CountQueuingStrategy: size() method / notebook
CountQueuingStrategy: size() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.