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

Specification
Pointer Lock 2.0
# dom-document-exitpointerlock

Browser compatibility

BCD tables only load in the browser

See also