--- title: ReadableStream.locked slug: Web/API/ReadableStream/locked tags: - API - Property - ReadableStream - Reference - Streams - locked translation_of: Web/API/ReadableStream/locked ---
{{domxref("ReadableStream")}} インターフェイスの locked
読み取り専用プロパティは、読み取り可能なストリームがリーダーにロックされているかどうかを返します。
var locked =
readableStream.locked;
読み取り可能なストリームがロックされているかどうかを示す {{jsxref("Boolean")}}。
const stream = new ReadableStream({ ... }); const reader = stream.getReader(); stream.locked // ストリームがリーダーにロックされているため、true を返すべきです
仕様 | 状態 | コメント |
---|---|---|
{{SpecName("Streams","#rs-locked","locked")}} | {{Spec2('Streams')}} | 初期定義 |
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.
{{Compat("api.ReadableStream.locked")}}