--- title: Document.pointerLockElement slug: Web/API/Document/pointerLockElement translation_of: Web/API/DocumentOrShadowRoot/pointerLockElement original_slug: Web/API/DocumentOrShadowRoot/pointerLockElement ---
pointerLockElement 特性规定了如在鼠标事件中当目标被锁定时的元素集和。如果指针处于锁定等待中、指针没有被锁定,或者目标在另外一个文档中这几种情况,返回的值null。
var element = document.pointerLockElement;
An {{domxref("Element")}} or null
.
Specification | Status | Comment |
---|---|---|
{{SpecName('Pointer Lock','l#extensions-to-the-document-interface','Document')}} | {{Spec2('Pointer Lock')}} | Extend the Document interface |