This feature is not Baseline because it does not work in some of the most widely-used browsers.
The exitPointerLock() method of the Document interface asynchronously releases a pointer lock previously requested through Element.requestPointerLock.
Note: While the exitPointerLock() method is called on the document, the requestPointerLock() method is called on an element.
To track the success or failure of the request, it is necessary to listen for the pointerlockchange and pointerlockerror events.
exitPointerLock()
None.
None (undefined).
| Specification |
|---|
| Pointer Lock 2.0> # dom-document-exitpointerlock> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
exitPointerLock |
3722 | 13 | 5014–50 | 2415 | 10.1 | No | 5014–50 | No | No | No | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Document/exitPointerLock