From c46e9da7f68bd682fc9ff1452b7fe63df1227151 Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Wed, 2 Mar 2022 20:01:54 +0900 Subject: Migrate to Compat macro (zh-tw) --- files/zh-tw/web/api/document/body/index.html | 52 +------------ .../api/document/createdocumentfragment/index.html | 52 +------------ .../web/api/document/createelement/index.html | 86 +--------------------- .../web/api/document/createtextnode/index.html | 48 +----------- .../web/api/document/createtreewalker/index.html | 81 +------------------- .../zh-tw/web/api/document/defaultview/index.html | 54 +------------- files/zh-tw/web/api/document/designmode/index.html | 56 +------------- .../api/document/getelementsbyclassname/index.html | 48 +----------- files/zh-tw/web/api/document/head/index.html | 52 +------------ .../web/api/document/queryselector/index.html | 49 +----------- .../web/api/document/registerelement/index.html | 50 +------------ 11 files changed, 13 insertions(+), 615 deletions(-) (limited to 'files/zh-tw/web/api/document') diff --git a/files/zh-tw/web/api/document/body/index.html b/files/zh-tw/web/api/document/body/index.html index a33d2a7901..b460c50680 100644 --- a/files/zh-tw/web/api/document/body/index.html +++ b/files/zh-tw/web/api/document/body/index.html @@ -69,57 +69,7 @@ alert(document.body.id); // "newBodyElement"

瀏覽器相容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1{{CompatVersionUnknown}}269.6 (possibly earlier)4 (possibly earlier)
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}5 (probably earlier)
-
+{{Compat("api.Document.body")}}

參見

diff --git a/files/zh-tw/web/api/document/createdocumentfragment/index.html b/files/zh-tw/web/api/document/createdocumentfragment/index.html index efdd4c31e6..73190921e0 100644 --- a/files/zh-tw/web/api/document/createdocumentfragment/index.html +++ b/files/zh-tw/web/api/document/createdocumentfragment/index.html @@ -76,57 +76,7 @@ element.appendChild(fragment);

瀏覽器相容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
特色Firefox (Gecko)ChromeEdgeInternet ExplorerOperaSafari
基礎支援{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
特色Firefox Mobile (Gecko)AndroidEdgeIE MobileOpera MobileSafari Mobile
基礎支援{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat("api.Document.createDocumentFragment")}}

更多參考

diff --git a/files/zh-tw/web/api/document/createelement/index.html b/files/zh-tw/web/api/document/createelement/index.html index 2d847004cc..b89f63e21a 100644 --- a/files/zh-tw/web/api/document/createelement/index.html +++ b/files/zh-tw/web/api/document/createelement/index.html @@ -82,91 +82,7 @@ function addElement () {

瀏覽器相容性

-

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}[1][2]{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
options argument{{CompatVersionUnknown}}[3]{{CompatUnknown}}{{CompatGeckoDesktop(50)}}[4][5]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidAndroid WebviewEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
options argument{{CompatVersionUnknown}}{{CompatVersionUnknown}}[3]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}[3]
-
- -

[1] Starting with Gecko 22.0 {{geckoRelease("22.0")}} createElement() no longer uses the {{domxref("HTMLSpanElement")}} interface when the argument is "bgsounds", "multicol", or "image".  Instead, HTMLUnknownElement is used for "bgsound" and "multicol" and {{domxref("HTMLElement")}} HTMLElement is used for "image".

- -

[2] The Gecko implementation of createElement doesn't conform to the DOM spec for XUL and XHTML documents: localName and namespaceURI are not set to null on the created element. See {{ Bug(280692) }} for details.

- -

[3] In previous versions of the specification, this argument was just a string whose value was the custom element's tag name. For example: document.createElement("button", "custom-button") rather than document.createElement("button", {id: "custom-button"}). For the sake of backwards compatibility, Chrome accepts both forms.

- -

[4] See [3] above: like Chrome, Firefox accepts a string instead of an object here, but only from version 51 onwards. In version 50,  options must be an object.

- -

[5] To experiment with custom elements in Firefox, you must set the dom.webcomponents.enabled and dom.webcomponents.customelements.enabled preferences to true.

+{{Compat("api.Document.createElement")}}

參見

diff --git a/files/zh-tw/web/api/document/createtextnode/index.html b/files/zh-tw/web/api/document/createtextnode/index.html index 80d3d562b9..b90420cf8b 100644 --- a/files/zh-tw/web/api/document/createtextnode/index.html +++ b/files/zh-tw/web/api/document/createtextnode/index.html @@ -71,50 +71,4 @@ function addTextNode(text) {

Browser compatibility

-

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat("api.Document.createTextNode")}} diff --git a/files/zh-tw/web/api/document/createtreewalker/index.html b/files/zh-tw/web/api/document/createtreewalker/index.html index 5e1b889c32..24582215c5 100644 --- a/files/zh-tw/web/api/document/createtreewalker/index.html +++ b/files/zh-tw/web/api/document/createtreewalker/index.html @@ -139,85 +139,8 @@ while(treeWalker.nextNode()) nodeList.push(treeWalker.currentNode);

Browser compatibility

-

{{CompatibilityTable}}

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support1.0{{CompatGeckoDesktop("1.8.1")}}9.09.03.0
whatToShow and filter optional1.0{{CompatGeckoDesktop("12")}}{{CompatNo}}{{CompatVersionUnknown}}3.0
expandEntityReferences {{obsolete_inline}}1.0{{CompatGeckoDesktop("1.8.1")}}
- Removed in {{CompatGeckoDesktop("12")}}
9.09.03.0
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatGeckoMobile("1.8.1")}}{{CompatVersionUnknown}}9.03.0
whatToShow and filter optional{{CompatVersionUnknown}}{{CompatGeckoDesktop("12")}}{{CompatNo}}{{CompatVersionUnknown}}3.0
expandEntityReferences {{obsolete_inline}}{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.8.1")}}
- Removed in {{CompatGeckoDesktop("12")}}
{{CompatVersionUnknown}}9.03.0
-
+{{Compat("api.Document.createTreeWalker")}} +

See also