Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
Since March 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
* Some parts of this feature may have varying levels of support.
releaseLock() は ReadableStreamBYOBReader インターフェイスのメソッドで、ストリーム上のリーダーのロックを解除します。 ロックを解除すると、リーダーはアクティブではなくなります。
ロックを解除したときに関連するストリームにエラーが発生した場合、リーダーはその後同様にエラーが発生したようになります。 そうでない場合、リーダーは閉じた状態になります。
保留中の読み込みリクエストがある間にリーダーのロックが解除された場合、リーダーの ReadableStreamBYOBReader.read() メソッドによって返されるプロミスは、直ちに TypeError で拒否されます。 未読のチャンクはストリームの内部キューに残り、後で新しいリーダーを取得することで読み取ることができます。
なし。
なし (undefined)。
ソースオブジェクトが ReadableStreamBYOBReader ではない場合に発生します。
簡単な例を下記に示します。 ストリーム上にリーダーが作成されると同時にロックが作成されます。
| Streams # ref-for-byob-reader-release-lock② |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2023年9月26日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.