DocumentOrShadowRoot.pointerLockElement

The pointerLockElement property of the Document and ShadowRoot interfaces 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
Unknown
The definition of 'pointerLockElement' in that specification.
Candidate Recommendation Extend the Document interface

Browser compatibility

BCD tables only load in the browser

See also