草案
此页面不完整。
这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
size()
方法在
CountQueuingStrategy
interface always returns
1
, so that the total queue size is a count of the number of chunks in the queue.
var size = countQueuingStrategy.size();
None.
1
.
const queuingStrategy = new CountQueuingStrategy({ highWaterMark: 1 });
const writableStream = new WritableStream({
// Implement the sink
write(chunk) {
...
},
close() {
...
},
abort(err) {
console.log("Sink error:", err);
}
}, queuingStrategy);
var size = queuingStrategy.size();
| 规范 | 状态 | 注释 |
|---|---|---|
|
流
The definition of 'size' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
size
|
Chrome 59 | Edge 16 |
Firefox
57
Disabled
|
IE No | Opera 46 | Safari ? | WebView Android 59 | Chrome Android 59 |
Firefox Android
57
Disabled
|
Opera Android 43 | Safari iOS ? | Samsung Internet Android 7.0 |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
用户必须明确启用此特征。
CountQueuingStrategy
size()