ReadableStreamDefaultController: desiredSize プロパティ
desiredSize
は ReadableStreamDefaultController
インターフェイスの読み取り専用プロパティで、ストリームの内部キューを満たすために必要な希望サイズを返します。
値
整数。 キューがいっぱいになった場合、これは負になる可能性があることに注意してください。
例
仕様にある基になるプッシュソースと背圧サポートのある読み取り可能なストリームの例は、desiredSize
を使用してストリームがいっぱいになったことを手動で検出し、背圧を適用する良い例を示しています。 また、ReadablestreamDefaultController.error()
を使用して、依存しているシステムの別の部分に障害が発生した場合に手動でストリームのエラーをトリガーします。
仕様書
Specification |
---|
Streams # ref-for-rs-default-controller-desired-size② |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
desiredSize |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.