From 40edc745dfb5c152e12080748f9357b376e8dbe9 Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 18 May 2021 00:44:37 +0000 Subject: [CRON] sync translated content --- files/zh-tw/_redirects.txt | 1 + files/zh-tw/_wikihistory.json | 14 +- files/zh-tw/orphaned/web/api/parentnode/index.html | 167 +++++++++++++++++++++ files/zh-tw/web/api/parentnode/index.html | 166 -------------------- 4 files changed, 175 insertions(+), 173 deletions(-) create mode 100644 files/zh-tw/orphaned/web/api/parentnode/index.html delete mode 100644 files/zh-tw/web/api/parentnode/index.html (limited to 'files/zh-tw') diff --git a/files/zh-tw/_redirects.txt b/files/zh-tw/_redirects.txt index 0164449ed0..881453191d 100644 --- a/files/zh-tw/_redirects.txt +++ b/files/zh-tw/_redirects.txt @@ -574,6 +574,7 @@ /zh-TW/docs/Web/API/HTMLElement/style /zh-TW/docs/Web/API/ElementCSSInlineStyle/style /zh-TW/docs/Web/API/Node/innerText /zh-TW/docs/Web/API/HTMLElement/innerText /zh-TW/docs/Web/API/NonDocumentTypeChildNode /zh-TW/docs/conflicting/Web/API/Element +/zh-TW/docs/Web/API/ParentNode /zh-TW/docs/orphaned/Web/API/ParentNode /zh-TW/docs/Web/API/ParentNode/children /zh-TW/docs/orphaned/Web/API/ParentNode/children /zh-TW/docs/Web/API/ParentNode/firstElementChild /zh-TW/docs/orphaned/Web/API/ParentNode/firstElementChild /zh-TW/docs/Web/API/Performance.timing /zh-TW/docs/Web/API/Performance/timing diff --git a/files/zh-tw/_wikihistory.json b/files/zh-tw/_wikihistory.json index 63741f5a43..9c70666911 100644 --- a/files/zh-tw/_wikihistory.json +++ b/files/zh-tw/_wikihistory.json @@ -4354,13 +4354,6 @@ "MashKao" ] }, - "Web/API/ParentNode": { - "modified": "2019-12-24T08:07:24.128Z", - "contributors": [ - "ianchen0119", - "jackblackevo" - ] - }, "Web/API/PaymentRequest": { "modified": "2020-10-15T22:13:15.817Z", "contributors": [ @@ -8732,6 +8725,13 @@ "H-W-Chang" ] }, + "orphaned/Web/API/ParentNode": { + "modified": "2019-12-24T08:07:24.128Z", + "contributors": [ + "ianchen0119", + "jackblackevo" + ] + }, "orphaned/Web/API/ParentNode/children": { "modified": "2019-03-23T22:12:04.488Z", "contributors": [ diff --git a/files/zh-tw/orphaned/web/api/parentnode/index.html b/files/zh-tw/orphaned/web/api/parentnode/index.html new file mode 100644 index 0000000000..a1b751b027 --- /dev/null +++ b/files/zh-tw/orphaned/web/api/parentnode/index.html @@ -0,0 +1,167 @@ +--- +title: ParentNode +slug: orphaned/Web/API/ParentNode +translation_of: Web/API/ParentNode +original_slug: Web/API/ParentNode +--- +
{{APIRef("DOM")}}
+ +

ParentNode 介面定義了可以擁有子節點之 {{domxref("Node")}} 物件的方法。

+ +

ParentNode 是一個原始的介面,且不能以此建立物件實體。{{domxref("Element")}}、{{domxref("Document")}} 及 {{domxref("DocumentFragment")}} 物件皆實作了 ParentNode

+ +

屬性

+ +
+
{{domxref("ParentNode.children")}} {{experimental_inline}} {{readonlyInline}}
+
該屬性會返回一個 {{domxref("HTMLCollection")}} 實例,包括 ParentNode的所有子元素節點,需要特別注意的是:該屬性為唯讀
+
{{domxref("ParentNode.firstElementChild")}} {{experimental_inline}} {{readonlyInline}}
+
該屬性會返回 ParentNode的第一個子元素 ,如果該節點沒有子節點則返回null
+
{{domxref("ParentNode.lastElementChild")}} {{experimental_inline}} {{readonlyInline}}
+
該屬性會返回 ParentNode的最後一個子元素 ,如果該節點沒有子節點則返回null
+
{{domxref("ParentNode.childElementCount")}} {{experimental_inline}} {{readonlyInline}}
+
該屬性會返回一個無符號長整數 ,該值表示了該節點的子節點數量。
+
+ +

方法

+ +
+
{{domxref("ParentNode.append()")}} {{experimental_inline}}
+
Inserts a set of {{domxref("Node")}} objects or {{domxref("DOMString")}} objects after the last child of the ParentNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
+
{{domxref("ParentNode.prepend()")}} {{experimental_inline}}
+
Inserts a set of {{domxref("Node")}} objects or {{domxref("DOMString")}} objects before the first child of the ParentNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
+
{{domxref("ParentNode.querySelector()")}}
+
Returns the first {{domxref("Element")}} with the current element as root that matches the specified group of selectors.
+
{{domxref("ParentNode.querySelectorAll()")}}
+
Returns a {{domxref("NodeList")}} representing a list of elements with the current element as root that matches the specified group of selectors.
+
+ +

規範

+ + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#parentnode', 'ParentNode')}}{{Spec2('DOM WHATWG')}}Added the append() and prepend() methods.
{{SpecName('DOM4', '#parentnode', 'ParentNode')}}{{Spec2('DOM4')}}Splitted the ElementTraversal interface in {{domxref("ChildNode")}} and ParentNode. The firstElementChild, lastElementChild, and childElementCount properties are now defined on the latter.
+ The {{domxref("Document")}} and {{domxref("DocumentFragment")}} implemented the new interfaces.
+ Added the children property and the querySelector() and querySelectorAll() methods.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and used it on {{domxref("Element")}}.
+ +

瀏覽器相容性

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}}){{CompatChrome(1.0)}}{{CompatGeckoDesktop("1.9.1")}}9.0 [1]10.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatChrome(29.0)}}{{CompatGeckoDesktop(25)}}{{CompatNo}}16.0{{CompatNo}}
append() and prepend() {{experimental_inline}}{{CompatChrome(54.0)}}{{CompatGeckoDesktop(49)}}{{CompatVersionUnknown}}{{CompatOpera(39)}}{{CompatNo}}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile(25)}}{{CompatNo}}16.0{{CompatNo}}{{CompatVersionUnknown}}
append() and prepend() {{experimental_inline}}{{CompatNo}}{{CompatChrome(54.0)}}{{CompatGeckoMobile(49)}}{{CompatNo}}{{CompatOperaMobile(39)}}{{CompatNo}}{{CompatChrome(54.0)}}
+
+ +

[1] Internet Explorer 6, 7 and 8 supported it, but erroneously returns {{domxref("Comment")}} nodes as part of the results.

+ +

參見

+ + diff --git a/files/zh-tw/web/api/parentnode/index.html b/files/zh-tw/web/api/parentnode/index.html deleted file mode 100644 index f3a37abb2f..0000000000 --- a/files/zh-tw/web/api/parentnode/index.html +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: ParentNode -slug: Web/API/ParentNode -translation_of: Web/API/ParentNode ---- -
{{APIRef("DOM")}}
- -

ParentNode 介面定義了可以擁有子節點之 {{domxref("Node")}} 物件的方法。

- -

ParentNode 是一個原始的介面,且不能以此建立物件實體。{{domxref("Element")}}、{{domxref("Document")}} 及 {{domxref("DocumentFragment")}} 物件皆實作了 ParentNode

- -

屬性

- -
-
{{domxref("ParentNode.children")}} {{experimental_inline}} {{readonlyInline}}
-
該屬性會返回一個 {{domxref("HTMLCollection")}} 實例,包括 ParentNode的所有子元素節點,需要特別注意的是:該屬性為唯讀
-
{{domxref("ParentNode.firstElementChild")}} {{experimental_inline}} {{readonlyInline}}
-
該屬性會返回 ParentNode的第一個子元素 ,如果該節點沒有子節點則返回null
-
{{domxref("ParentNode.lastElementChild")}} {{experimental_inline}} {{readonlyInline}}
-
該屬性會返回 ParentNode的最後一個子元素 ,如果該節點沒有子節點則返回null
-
{{domxref("ParentNode.childElementCount")}} {{experimental_inline}} {{readonlyInline}}
-
該屬性會返回一個無符號長整數 ,該值表示了該節點的子節點數量。
-
- -

方法

- -
-
{{domxref("ParentNode.append()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} objects or {{domxref("DOMString")}} objects after the last child of the ParentNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ParentNode.prepend()")}} {{experimental_inline}}
-
Inserts a set of {{domxref("Node")}} objects or {{domxref("DOMString")}} objects before the first child of the ParentNode. {{domxref("DOMString")}} objects are inserted as equivalent {{domxref("Text")}} nodes.
-
{{domxref("ParentNode.querySelector()")}}
-
Returns the first {{domxref("Element")}} with the current element as root that matches the specified group of selectors.
-
{{domxref("ParentNode.querySelectorAll()")}}
-
Returns a {{domxref("NodeList")}} representing a list of elements with the current element as root that matches the specified group of selectors.
-
- -

規範

- - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('DOM WHATWG', '#parentnode', 'ParentNode')}}{{Spec2('DOM WHATWG')}}Added the append() and prepend() methods.
{{SpecName('DOM4', '#parentnode', 'ParentNode')}}{{Spec2('DOM4')}}Splitted the ElementTraversal interface in {{domxref("ChildNode")}} and ParentNode. The firstElementChild, lastElementChild, and childElementCount properties are now defined on the latter.
- The {{domxref("Document")}} and {{domxref("DocumentFragment")}} implemented the new interfaces.
- Added the children property and the querySelector() and querySelectorAll() methods.
{{SpecName('Element Traversal', '#interface-elementTraversal', 'ElementTraversal')}}{{Spec2('Element Traversal')}}Added the initial definition of its properties to the ElementTraversal pure interface and used it on {{domxref("Element")}}.
- -

瀏覽器相容性

- -

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support (on {{domxref("Element")}}){{CompatChrome(1.0)}}{{CompatGeckoDesktop("1.9.1")}}9.0 [1]10.04.0
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatChrome(29.0)}}{{CompatGeckoDesktop(25)}}{{CompatNo}}16.0{{CompatNo}}
append() and prepend() {{experimental_inline}}{{CompatChrome(54.0)}}{{CompatGeckoDesktop(49)}}{{CompatVersionUnknown}}{{CompatOpera(39)}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewFirefox Mobile (Gecko)IE MobileOpera MobileSafari MobileChrome for Mobile
Basic support (on {{domxref("Element")}}){{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile("1.9.1")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Support on {{domxref("Document")}} and {{domxref("DocumentFragment")}} {{experimental_inline}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatGeckoMobile(25)}}{{CompatNo}}16.0{{CompatNo}}{{CompatVersionUnknown}}
append() and prepend() {{experimental_inline}}{{CompatNo}}{{CompatChrome(54.0)}}{{CompatGeckoMobile(49)}}{{CompatNo}}{{CompatOperaMobile(39)}}{{CompatNo}}{{CompatChrome(54.0)}}
-
- -

[1] Internet Explorer 6, 7 and 8 supported it, but erroneously returns {{domxref("Comment")}} nodes as part of the results.

- -

參見

- - -- cgit v1.2.3-54-g00ecf