Document:exitPointerLock() 方法
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Document
接口的 exitPointerLock()
方法异步释放先前通过 Element.requestPointerLock
请求的指针锁定。
备注:
在文档上调用 exitPointerLock()
方法,在元素上调用 requestPointerLock()
方法。
要跟踪请求的成功或失败,需要监听 pointerlockchange
事件和 pointerlockerror
事件。
语法
js
exitPointerLock()
参数
无。
返回值
无(undefined
)。
规范
Specification |
---|
Pointer Lock 2.0 # dom-document-exitpointerlock |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
exitPointerLock |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Requires a vendor prefix or different name for use.
- Has more compatibility info.
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.