Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Element.requestPointerLock()
method lets you asynchronously ask for the pointer to be locked on the given element.
To track the success or failure of the request, it is necessary to listen for the pointerlockchange
and pointerlockerror
events at the Document
level.