We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

DocumentOrShadowRoot.pointerLockElement

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.

Syntax

var element = document.pointerLockElement;

Return value

An Element or null.

Specifications

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 Yes6.0

See also

Document Tags and Contributors

Last updated by: jpmedley,