Document.exitPointerLock()

Experimental: 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

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
exitPointerLock
37
22
13
50
14-50
No
24
15
10.1
37
≤37
37
25
50
14-50
24
14
10.3
3.0
1.5

See also

© 2005–2021 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