Skip to content

Commit

Permalink
[zh-CN]: add translation for ShadowRoot.fullscreenElement & sync fo…
Browse files Browse the repository at this point in the history
…r other three pages (#23760)
  • Loading branch information
skyclouds2001 authored Sep 26, 2024
1 parent 6bc2cd6 commit fa5a827
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/document/exitfullscreen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Document:exitFullscreen() 方法
slug: Web/API/Document/exitFullscreen
l10n:
sourceCommit: 41a8b9c9832359d445d136b6d7a8a28737badc6b
sourceCommit: be8f7f155a48e11b30c240f8731afb1845f85378
---

{{ApiRef("Fullscreen API")}}
Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/document/fullscreen/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Document:fullscreen 属性
slug: Web/API/Document/fullscreen
l10n:
sourceCommit: 41a8b9c9832359d445d136b6d7a8a28737badc6b
sourceCommit: be8f7f155a48e11b30c240f8731afb1845f85378
---

{{APIRef("Fullscreen API")}}{{Deprecated_Header}}
Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/document/fullscreenelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ l10n:

{{ApiRef("Fullscreen API")}}

只读属性 **`Document.fullscreenElement`** 返回当前页面中以全屏模式呈现的 {{domxref("Element")}},如果当前页面未使用全屏模式,则返回 `null`
**`Document.fullscreenElement`** 只读属性返回当前页面中以全屏模式呈现的 {{domxref("Element")}},如果当前页面未使用全屏模式,则返回 `null`

尽管这个属性是只读的,但如果修改它,即使在严格模式下也不会抛出错误;它的 `setter` 方法是空操作将被忽略。

Expand Down
34 changes: 34 additions & 0 deletions files/zh-cn/web/api/shadowroot/fullscreenelement/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: ShadowRoot:fullscreenElement 属性
slug: Web/API/ShadowRoot/fullscreenElement
l10n:
sourceCommit: f2f9346c0c0e9f6676f2df9f1850933e274401de
---

{{APIRef("Shadow DOM")}}

{{domxref("ShadowRoot")}} 接口的 **`fullscreenElement`** 只读属性返回影子树中当前全屏显示的元素。

##

当前以全屏模式显示的 {{domxref('Element')}},若无全屏元素则为 `null`

## 示例

```js
let customElem = document.querySelector("my-shadow-dom-element");
let shadow = customElem.shadowRoot;
let fullscreenElem = shadow.fullscreenElement;
```

## 规范

{{Specifications}}

## 浏览器兼容性

{{Compat}}

## 参见

- {{domxref("Document.fullscreenElement")}}

0 comments on commit fa5a827

Please sign in to comment.