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