requestPointerLock() method in javascript
requestPointerLock() method is used to lock the mouse pointer on the specific element.
It is supported only on firefox and chrome browsers.
In the above example it checks whether the browser support requestPointerLock method, if it is supports it returns true else false.
exitPointerLock() method in javascript
exitPointerLock() method is used to unlock the mouse pointer which was locked by requestPointerLock.