WritableStream.locked
WritableStream
接口的只读属性 locked
返回一个布尔值,表示 WritableStream
是否锁定到一个 writer。
值
一个布尔值,表示可写流是否已锁定。
示例
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
规范
Specification |
---|
Streams # ref-for-ws-locked② |
浏览器兼容性
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.