WritableStream: locked-Eigenschaft
Hinweis: Diese Funktion ist in Web Workers verfügbar.
Die locked
schreibgeschützte Eigenschaft der WritableStream
-Schnittstelle gibt einen booleschen Wert zurück, der anzeigt, ob der WritableStream
an einen Writer gebunden ist.
Wert
Ein boolescher Wert, der anzeigt, ob der writable stream gebunden ist oder nicht.
Beispiele
js
const writableStream = new WritableStream(
{
write(chunk) {
// ...
},
close() {
// ...
},
abort(err) {
// ...
},
},
queuingStrategy,
);
// ...
const writer = writableStream.getWriter();
writableStream.locked;
// should return true, as the stream has been locked to a writer
Spezifikationen
Specification |
---|
Streams # ref-for-ws-locked② |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
locked |
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.