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) --- .../api/window/domcontentloaded_event/index.html | 56 +---------------- .../web/api/window/getcomputedstyle/index.html | 70 +--------------------- files/zh-tw/web/api/window/location/index.html | 49 +-------------- .../web/api/window/requestidlecallback/index.html | 54 +---------------- 4 files changed, 4 insertions(+), 225 deletions(-) (limited to 'files/zh-tw/web/api/window') diff --git a/files/zh-tw/web/api/window/domcontentloaded_event/index.html b/files/zh-tw/web/api/window/domcontentloaded_event/index.html index 54d0497519..ed2e701f8d 100644 --- a/files/zh-tw/web/api/window/domcontentloaded_event/index.html +++ b/files/zh-tw/web/api/window/domcontentloaded_event/index.html @@ -67,61 +67,7 @@ original_slug: Web/Events/DOMContentLoaded

瀏覽器相容性

-

{{ CompatibilityTable() }}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support0.2{{ CompatGeckoDesktop("1") }}9.09.03.1
-
- -
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ CompatGeckoMobile("1") }}{{ CompatUnknown() }}{{ CompatVersionUnknown() }}{{ CompatVersionUnknown() }}
-
- -

Bubbling for this event is supported by at least Gecko 1.9.2, Chrome 6, and Safari 4.

- -

Cross-browser fallback

- -

Internet Explorer 8 supports the <code>readystatechange</code> event, which can be used to detect that the DOM is ready. In earlier version of Internet Explorer, this state can be detected by regularily trying to execute <code>document.documentElement.doScroll("left");</code>, as this snippet will throw an error until the DOM is ready.

- -

General-purpose JS libraries such as jQuery offer cross-browser methods to detect that the DOM is ready. There are also standalone scripts that offer this feature : contentloaded.js (supports only one listener) and jquery.documentReady.js (doesn't depend on jQuery, despite its name).

+{{Compat("api.Window.DOMContentLoaded_event")}} diff --git a/files/zh-tw/web/api/window/getcomputedstyle/index.html b/files/zh-tw/web/api/window/getcomputedstyle/index.html index 8dd0f24bad..09a3f58f03 100644 --- a/files/zh-tw/web/api/window/getcomputedstyle/index.html +++ b/files/zh-tw/web/api/window/getcomputedstyle/index.html @@ -115,75 +115,7 @@ var style = window.getComputedStyle(elem1, null);

瀏覽器相容性

-

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}9{{CompatVersionUnknown}}{{CompatVersionUnknown}}
pseudo-element support{{CompatVersionUnknown}}{{CompatUnknown}}{{CompatVersionUnknown}}915{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}WP7 Mango{{CompatVersionUnknown}}{{CompatVersionUnknown}}
pseudo-element support{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatNo}}{{CompatUnknown}}{{CompatUnknown}}
-
+{{Compat("api.Window.getComputedStyle")}}

規範

diff --git a/files/zh-tw/web/api/window/location/index.html b/files/zh-tw/web/api/window/location/index.html index a887f88ee0..b156a5808c 100644 --- a/files/zh-tw/web/api/window/location/index.html +++ b/files/zh-tw/web/api/window/location/index.html @@ -323,51 +323,4 @@ span.intLink {

See also

Manipulating the browser history

Browser compatibility

-

{{ CompatibilityTable() }}

-
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
-
- - - - - - - - - - - - - - - - - - - -
FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic support{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}{{ CompatUnknown() }}
-
-

Specification

-

HTML Specification: window . location

-

{{ languages( { "fr": "fr/DOM/window.location", "ja": "ja/DOM/window.location" } ) }}

+{{Compat("api.Window.location")}} diff --git a/files/zh-tw/web/api/window/requestidlecallback/index.html b/files/zh-tw/web/api/window/requestidlecallback/index.html index 743e7b2a39..afbaecdbc3 100644 --- a/files/zh-tw/web/api/window/requestidlecallback/index.html +++ b/files/zh-tw/web/api/window/requestidlecallback/index.html @@ -55,59 +55,7 @@ translation_of: Web/API/Window/requestIdleCallback

Browser compatibility

-

{{CompatibilityTable}}

- -
- - - - - - - - - - - - - - - - - - - -
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{CompatChrome(47)}}{{CompatGeckoDesktop(53)}} [1]{{CompatNo}}{{CompatOpera(34)}}{{CompatNo}}
-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
FeatureAndroid WebviewChrome for AndroidFirefox Mobile (Gecko)Firefox OSIE MobileOpera MobileSafari Mobile
Basic support{{CompatChrome(47)}}{{CompatChrome(47)}}{{CompatGeckoMobile(53)}} [1]{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
-
- -

[1] requestIdleCallback() is implemented in Firefox 53 but is disabled by default; to enable it, set the preference dom.requestIdleCallback.enabled to true. It is enabled by default starting in Firefox 55.

+{{Compat("api.Window.requestIdleCallback")}}

See also

-- cgit v1.2.3-54-g00ecf