We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


The pointerLockElement property provides the element set as the target for mouse events while the pointer is locked. It is null if lock is pending, pointer is unlocked, or the target is in another document.


var element = document.pointerLockElement;

Return value

An Element or null.


Specification Status Comment
Pointer Lock
The definition of 'pointerLockElement' in that specification.
Candidate Recommendation Extend the Document interface

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support53 Yes Yes Yes40 Yes
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support5353 Yes Yes40 Yes ?

See also

Document Tags and Contributors

 Contributors to this page: fscholz, chrisdavidmills, erikadoyle, wbamberg, teoli, kscarfone, Jeremie
 Last updated by: fscholz,