This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The exitPointerLock()
method asynchronously releases a pointer lock previously requested through Element.requestPointerLock
.
To track the success or failure of the request, it is necessary to listen for the pointerlockchange
and pointerlockerror
events.
Syntax
document.exitPointerLock();
Specifications
Specification | Status | Comment |
---|---|---|
Pointer Lock The definition of 'Document' in that specification. |
Candidate Recommendation | Extend the Document interface |
Browser compatibility
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.
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
exitPointerLock | Chrome
Full support
45
| Edge Full support 13 | Firefox
Full support
50
| IE ? | Opera Full support Yes | Safari Full support Yes | WebView Android
Full support
45
| Chrome Android
Full support
45
| Firefox Android
Full support
50
| Opera Android Full support Yes | Safari iOS ? | Samsung Internet Android
Full support
5.0
|
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- Requires a vendor prefix or different name for use.
- Requires a vendor prefix or different name for use.