Baseline Widely available
Note: This feature is available in Web Workers.
The size()
method of the ByteLengthQueuingStrategy
interface returns the given chunk's byteLength
property.
chunk
A chunk of data being passed through the stream.
An integer representing the byte length of the given chunk.
Examplesconst queuingStrategy = new ByteLengthQueuingStrategy({ highWaterMark: 1 });
const readableStream = new ReadableStream(
{
start(controller) {
// â¦
},
pull(controller) {
// â¦
},
cancel(err) {
console.log("stream error:", err);
},
},
queuingStrategy,
);
const size = queueingStrategy.size(chunk);
Specifications Browser compatibility See also
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4