From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/countqueuingstrategy/index.html | 78 ++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 files/ja/web/api/countqueuingstrategy/index.html (limited to 'files/ja/web/api/countqueuingstrategy/index.html') diff --git a/files/ja/web/api/countqueuingstrategy/index.html b/files/ja/web/api/countqueuingstrategy/index.html new file mode 100644 index 0000000000..9bd152f8be --- /dev/null +++ b/files/ja/web/api/countqueuingstrategy/index.html @@ -0,0 +1,78 @@ +--- +title: CountQueuingStrategy +slug: Web/API/CountQueuingStrategy +tags: + - API + - CountQueuingStrategy + - Experimental + - Interface + - Reference + - Streams +translation_of: Web/API/CountQueuingStrategy +--- +

{{SeeCompatTable}}{{APIRef("Streams")}}

+ +

Streams APICountQueuingStrategy インターフェイスは、ストリームの構築時に使用できる組み込みのチャンクカウントキューイング戦略を提供します。

+ +

コンストラクター

+ +
+
{{domxref("CountQueuingStrategy.CountQueuingStrategy", "CountQueuingStrategy()")}}
+
新しい CountQueuingStrategy オブジェクトのインスタンスを作成します。
+
+ +

プロパティ

+ +

なし。

+ +

メソッド

+ +
+
{{domxref("CountQueuingStrategy.size()")}}
+
1 を返します。
+
+ +

+ +
const queueingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });
+
+const writableStream = new WritableStream({
+  // シンクの実装
+  write(chunk) {
+    ...
+  },
+  close() {
+    ...
+  },
+  abort(err) {
+    console.log("Sink error:", err);
+  }
+}, queueingStrategy);
+
+var size = queueingStrategy.size();
+
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('Streams','#cqs-class','CountQueuingStrategy')}}{{Spec2('Streams')}}初期定義
+ +

ブラウザーの互換性

+ +
+ + +

{{Compat("api.CountQueuingStrategy")}}

+
-- cgit v1.2.3-54-g00ecf