Document: exitPointerLock() method
Limited availability
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.
Syntax
js
exitPointerLock()
Parameters
None.
Return value
None (undefined
).
Specifications
Specification |
---|
Pointer Lock 2.0 # dom-document-exitpointerlock |
Browser compatibility
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.