草案
此页面不完整。
这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
ByteLengthQueuingStrategy()
constructor creates and returns a
ByteLengthQueuingStrategy
对象实例。
var byteLengthQueuingStrategy = new ByteLengthQueuingStrategy({highWaterMark});
highWaterMark
property. This is a non-negative integer defining the total number of chunks that can be contained in the internal queue before backpressure is applied.
An instance of the
ByteLengthQueuingStrategy
对象。
None.
const queuingStrategy = new ByteLengthQueuingStrategy({ highWaterMark: 1 });
const readableStream = new ReadableStream({
start(controller) {
...
},
pull(controller) {
...
},
cancel(err) {
console.log("stream error:", err);
}
}, queuingStrategy);
var size = queuingStrategy.size(chunk);
| 规范 | 状态 | 注释 |
|---|---|---|
|
流
The definition of 'ByteLengthQueuingStrategy()' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ByteLengthQueuingStrategy()
构造函数
|
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 |
完整支持
不支持
兼容性未知
实验。期望将来行为有所改变。
用户必须明确启用此特征。
ByteLengthQueuingStrategy
ByteLengthQueuingStrategy()