| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/pointerLockElement | [Back] [Original] |
Get to know MDN better
The pointerLockElement read-only property of the ShadowRoot interface 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 tree.
An Element or null.
let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let pleElem = shadow.pointerLockElement;
| Specification |
|---|
| Pointer Lock 2.0 # dom-documentorshadowroot-pointerlockelement |
This page was last modified on Dec 11, 2023 by MDN contributors.
ShadowRootYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |