Document.exitPointerLock()
exitPointerLock
方法可异步的解锁鼠标(通过Element.requestPointerLock
锁定的)。
追踪是否解锁成功,需要监听pointerlockchange
和pointerlockerror
(en-US) 事件。
语法
document.exitPointerLock();
规范
Specification |
---|
Pointer Lock 2.0 # dom-document-exitpointerlock |
浏览器兼容性
BCD tables only load in the browser