A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/ByteLengthQueuingStrategy/size below:

ByteLengthQueuingStrategy: size() method - Web APIs

ByteLengthQueuingStrategy: size() method

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.

Syntax Parameters
chunk

A chunk of data being passed through the stream.

Return value

An integer representing the byte length of the given chunk.

Examples
const 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