LockManager
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2022.
备注: 此特性在 Web Worker 中可用。
Web Locks API 的 LockManager
接口提供了请求新的 Lock
对象以及枚举现有的 Lock
对象的方法。要获取 LockManager
实例,请访问 navigator.locks
属性。
实例方法
LockManager.request()
-
请求一个指定其名称和模式参数的
Lock
对象。 LockManager.query()
-
返回一个
Promise
,兑现一个包含持有的锁以及等待的锁请求的对象。
规范
Specification |
---|
Web Locks API # api-lock-manager |
浏览器兼容性
Report problems with this compatibility data on GitHubLegend
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.