ShadowRoot: pointerLockElement property
ThepointerLockElement
read-only property of theShadowRoot
interface provides the element set as the target for mouse events while the pointer is locked.It isnull
if lock is pending, pointer is unlocked, or the target is in another tree.
Value
AnElement
ornull
.
Examples
js
let customElem = document.querySelector("my-shadow-dom-element");let shadow = customElem.shadowRoot;let pleElem = shadow.pointerLockElement;
Specifications
Specification |
---|
Pointer Lock 2.0 # dom-documentorshadowroot-pointerlockelement |