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

{{domxref("CountQueuingStrategy")}} インターフェイスの size() メソッドは常に 1 を返すため、合計キューサイズはキュー内のチャンク数を数えたものになります。

+ +

構文

+ +
var size = countQueuingStrategy.size();
+ +

パラメーター

+ +

なし。

+ +

戻り値

+ +

1

+ +

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

仕様

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

ブラウザーの互換性

+ + + +

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

-- cgit v1.2.3-54-g00ecf