From 785c0b7c8adc9e73cfd07817009c4437255c9398 Mon Sep 17 00:00:00 2001 From: MDN Date: Wed, 10 Mar 2021 16:18:46 +0000 Subject: [CRON] sync translated content --- files/zh-cn/_redirects.txt | 4 +- files/zh-cn/_wikihistory.json | 24 ++--- .../web/api/document/pointerlockelement/index.html | 106 +++++++++++++++++++++ .../zh-cn/web/api/document/stylesheets/index.html | 53 +++++++++++ .../pointerlockelement/index.html | 106 --------------------- .../documentorshadowroot/stylesheets/index.html | 52 ---------- 6 files changed, 173 insertions(+), 172 deletions(-) create mode 100644 files/zh-cn/web/api/document/pointerlockelement/index.html create mode 100644 files/zh-cn/web/api/document/stylesheets/index.html delete mode 100644 files/zh-cn/web/api/documentorshadowroot/pointerlockelement/index.html delete mode 100644 files/zh-cn/web/api/documentorshadowroot/stylesheets/index.html (limited to 'files/zh-cn') diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 46943b1804..9ee008a3bd 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -1491,11 +1491,11 @@ /zh-CN/docs/Web/API/Document/mozFullScreenElement /zh-CN/docs/Web/API/Document/fullscreenElement /zh-CN/docs/Web/API/Document/mozFullScreenEnabled /zh-CN/docs/Web/API/Document/fullscreenEnabled /zh-CN/docs/Web/API/Document/onreadystatechange /en-US/docs/Web/API/Document/readystatechange_event -/zh-CN/docs/Web/API/Document/pointerLockElement /zh-CN/docs/Web/API/DocumentOrShadowRoot/pointerLockElement /zh-CN/docs/Web/API/Document/rouchmove_event /zh-CN/docs/Web/API/Document/touchmove_event -/zh-CN/docs/Web/API/Document/styleSheets /zh-CN/docs/conflicting/Web/API/DocumentOrShadowRoot/styleSheets /zh-CN/docs/Web/API/DocumentOrShadowRoot/activeElement /zh-CN/docs/Web/API/Document/activeElement /zh-CN/docs/Web/API/DocumentOrShadowRoot/fullscreenElement /zh-CN/docs/Web/API/Document/fullscreenElement +/zh-CN/docs/Web/API/DocumentOrShadowRoot/pointerLockElement /zh-CN/docs/Web/API/Document/pointerLockElement +/zh-CN/docs/Web/API/DocumentOrShadowRoot/styleSheets /zh-CN/docs/Web/API/Document/styleSheets /zh-CN/docs/Web/API/Document_Object_Model/Preface /zh-CN/docs/conflicting/Web/API/Document_Object_Model /zh-CN/docs/Web/API/Element.classList /zh-CN/docs/Web/API/Element/classList /zh-CN/docs/Web/API/Element.className /zh-CN/docs/Web/API/Element/className diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 31836b726e..6bb3beb84a 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -10390,12 +10390,6 @@ "WuCongMan" ] }, - "Web/API/DocumentOrShadowRoot/styleSheets": { - "modified": "2020-10-19T22:22:59.095Z", - "contributors": [ - "lastVigo" - ] - }, "Web/API/DocumentTouch": { "modified": "2019-03-23T22:57:10.414Z", "contributors": [ @@ -47145,12 +47139,6 @@ "ziyunfei" ] }, - "Web/API/DocumentOrShadowRoot/pointerLockElement": { - "modified": "2019-03-23T22:20:46.971Z", - "contributors": [ - "876843240" - ] - }, "Web/API/Document/touchmove_event": { "modified": "2019-04-30T14:14:32.752Z", "contributors": [ @@ -50798,5 +50786,17 @@ "April421", "xgqfrms" ] + }, + "Web/API/Document/pointerLockElement": { + "modified": "2019-03-23T22:20:46.971Z", + "contributors": [ + "876843240" + ] + }, + "Web/API/Document/styleSheets": { + "modified": "2020-10-19T22:22:59.095Z", + "contributors": [ + "lastVigo" + ] } } \ No newline at end of file diff --git a/files/zh-cn/web/api/document/pointerlockelement/index.html b/files/zh-cn/web/api/document/pointerlockelement/index.html new file mode 100644 index 0000000000..50f2343da8 --- /dev/null +++ b/files/zh-cn/web/api/document/pointerlockelement/index.html @@ -0,0 +1,106 @@ +--- +title: Document.pointerLockElement +slug: Web/API/Document/pointerLockElement +translation_of: Web/API/DocumentOrShadowRoot/pointerLockElement +original_slug: Web/API/DocumentOrShadowRoot/pointerLockElement +--- +
{{APIRef("DOM")}}
+ +

pointerLockElement 特性规定了如在鼠标事件中当目标被锁定时的元素集和。如果指针处于锁定等待中、指针没有被锁定,或者目标在另外一个文档中这几种情况,返回的值null。

+ +

语法

+ +
var element = document.pointerLockElement;
+
+ +

返回值

+ +

An {{domxref("Element")}} or null.

+ +

特性

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Pointer Lock','l#extensions-to-the-document-interface','Document')}}{{Spec2('Pointer Lock')}}Extend the Document interface
+ +

浏览器兼容

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }} {{property_prefix("webkit")}}{{CompatVersionUnknown}}{{ CompatVersionUnknown() }} {{property_prefix("moz")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
Unprefixed support{{ CompatVersionUnknown() }}{{CompatUnknown}}{{CompatGeckoDesktop(50)}}   
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
+
+ +

相关链接

+ + diff --git a/files/zh-cn/web/api/document/stylesheets/index.html b/files/zh-cn/web/api/document/stylesheets/index.html new file mode 100644 index 0000000000..f94497ceeb --- /dev/null +++ b/files/zh-cn/web/api/document/stylesheets/index.html @@ -0,0 +1,53 @@ +--- +title: DocumentOrShadowRoot.styleSheets +slug: Web/API/Document/styleSheets +translation_of: Web/API/DocumentOrShadowRoot/styleSheets +original_slug: Web/API/DocumentOrShadowRoot/styleSheets +--- +
{{SeeCompatTable}}{{APIRef("Shadow DOM")}}
+ +

styleSheets是{{domxref("DocumentOrShadowRoot")}}接口定义的只读属性,它会返回一个{{domxref('StyleSheetList')}} / {{domxref('CSSStyleSheet')}} 对象,这个对象对应的是通过引入或者嵌入文档中的样式表。

+ +

示例代码

+ +
function getStyleSheet(unique_title) {
+  for (var i=0; i<document.styleSheets.length; i++) {
+    var sheet = document.styleSheets[i];
+    if (sheet.title == unique_title) {
+      return sheet;
+    }
+  }
+}
+
+ +

说明

+ +

返回的列表中,排序规则如下:

+ + + +

规范

+ + + + + + + + + + + + + + +
规范状态说明
{{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}}{{Spec2('Shadow DOM')}}Initial definition.
+ +

浏览器兼容性

+ + + +

{{Compat("api.DocumentOrShadowRoot.styleSheets")}}

diff --git a/files/zh-cn/web/api/documentorshadowroot/pointerlockelement/index.html b/files/zh-cn/web/api/documentorshadowroot/pointerlockelement/index.html deleted file mode 100644 index 38702632bd..0000000000 --- a/files/zh-cn/web/api/documentorshadowroot/pointerlockelement/index.html +++ /dev/null @@ -1,106 +0,0 @@ ---- -title: Document.pointerLockElement -slug: Web/API/DocumentOrShadowRoot/pointerLockElement -translation_of: Web/API/DocumentOrShadowRoot/pointerLockElement -original_slug: Web/API/Document/pointerLockElement ---- -
{{APIRef("DOM")}}
- -

pointerLockElement 特性规定了如在鼠标事件中当目标被锁定时的元素集和。如果指针处于锁定等待中、指针没有被锁定,或者目标在另外一个文档中这几种情况,返回的值null。

- -

语法

- -
var element = document.pointerLockElement;
-
- -

返回值

- -

An {{domxref("Element")}} or null.

- -

特性

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Pointer Lock','l#extensions-to-the-document-interface','Document')}}{{Spec2('Pointer Lock')}}Extend the Document interface
- -

浏览器兼容

- -

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{ CompatVersionUnknown() }} {{property_prefix("webkit")}}{{CompatVersionUnknown}}{{ CompatVersionUnknown() }} {{property_prefix("moz")}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
Unprefixed support{{ CompatVersionUnknown() }}{{CompatUnknown}}{{CompatGeckoDesktop(50)}}   
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{CompatVersionUnknown}}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
- -

相关链接

- - diff --git a/files/zh-cn/web/api/documentorshadowroot/stylesheets/index.html b/files/zh-cn/web/api/documentorshadowroot/stylesheets/index.html deleted file mode 100644 index 1c9425a744..0000000000 --- a/files/zh-cn/web/api/documentorshadowroot/stylesheets/index.html +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: DocumentOrShadowRoot.styleSheets -slug: Web/API/DocumentOrShadowRoot/styleSheets -translation_of: Web/API/DocumentOrShadowRoot/styleSheets ---- -
{{SeeCompatTable}}{{APIRef("Shadow DOM")}}
- -

styleSheets是{{domxref("DocumentOrShadowRoot")}}接口定义的只读属性,它会返回一个{{domxref('StyleSheetList')}} / {{domxref('CSSStyleSheet')}} 对象,这个对象对应的是通过引入或者嵌入文档中的样式表。

- -

示例代码

- -
function getStyleSheet(unique_title) {
-  for (var i=0; i<document.styleSheets.length; i++) {
-    var sheet = document.styleSheets[i];
-    if (sheet.title == unique_title) {
-      return sheet;
-    }
-  }
-}
-
- -

说明

- -

返回的列表中,排序规则如下:

- - - -

规范

- - - - - - - - - - - - - - -
规范状态说明
{{SpecName('Shadow DOM','#extensions-to-the-documentorshadowroot-mixin','DocumentOrShadowRoot')}}{{Spec2('Shadow DOM')}}Initial definition.
- -

浏览器兼容性

- - - -

{{Compat("api.DocumentOrShadowRoot.styleSheets")}}

-- cgit v1.2.3-54-g00ecf