-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zh-CN]: add translation for `{Document, ShadowRoot}.pointerLockEleme…
…nt` (#23797)
- Loading branch information
1 parent
fd699a0
commit d045a6b
Showing
2 changed files
with
83 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
files/zh-cn/web/api/shadowroot/pointerlockelement/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: ShadowRoot:pointerLockElement 属性 | ||
slug: Web/API/ShadowRoot/pointerLockElement | ||
l10n: | ||
sourceCommit: c99ff93a1b71e7d664509fdd3e0c168920be967a | ||
--- | ||
|
||
{{APIRef("Pointer Lock API")}} | ||
|
||
{{domxref("ShadowRoot")}} 接口的 **`pointerLockElement`** 只读属性提供在指针锁定时作为鼠标事件目标的元素集。如果指针处于锁定等待中、指针没有被锁定或目标元素在另外一棵树中,则该属性为 `null`。 | ||
|
||
## 值 | ||
|
||
{{domxref("Element")}} 或 `null`。 | ||
|
||
## 示例 | ||
|
||
```js | ||
let customElem = document.querySelector("my-shadow-dom-element"); | ||
let shadow = customElem.shadowRoot; | ||
let pleElem = shadow.pointerLockElement; | ||
``` | ||
|
||
## 规范 | ||
|
||
{{Specifications}} | ||
|
||
## 浏览器兼容性 | ||
|
||
{{Compat}} | ||
|
||
## 参见 | ||
|
||
- {{ domxref("Document.exitPointerLock()") }} | ||
- {{ domxref("Element.requestPointerLock()") }} | ||
- [Pointer Lock](/zh-CN/docs/Web/API/Pointer_Lock_API) |