diff options
author | YujiSoftware <yuji.software+github@gmail.com> | 2022-03-02 20:01:54 +0900 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-03-04 01:02:45 +0800 |
commit | c46e9da7f68bd682fc9ff1452b7fe63df1227151 (patch) | |
tree | fe6c6e20521b16a22ec64755b88a39effd81a4d7 /files/zh-tw/web/api/window | |
parent | e671353fc364cef89441d031e0e8b9300b67951b (diff) | |
download | translated-content-c46e9da7f68bd682fc9ff1452b7fe63df1227151.tar.gz translated-content-c46e9da7f68bd682fc9ff1452b7fe63df1227151.tar.bz2 translated-content-c46e9da7f68bd682fc9ff1452b7fe63df1227151.zip |
Migrate to Compat macro (zh-tw)
Diffstat (limited to 'files/zh-tw/web/api/window')
4 files changed, 4 insertions, 225 deletions
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 <h2 id="瀏覽器相容性">瀏覽器相容性</h2> -<p>{{ CompatibilityTable() }}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>0.2</td> - <td>{{ CompatGeckoDesktop("1") }}</td> - <td>9.0</td> - <td>9.0</td> - <td>3.1</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatGeckoMobile("1") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - </tr> - </tbody> -</table> -</div> - -<p><span style="font-size: 14px; line-height: 18px;">Bubbling for this event is supported by at least Gecko 1.9.2, Chrome 6, and Safari 4.</span></p> - -<h3 id="Cross-browser_fallback">Cross-browser fallback</h3> - -<p>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.</p> - -<p>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 : <a href="https://github.com/dperini/ContentLoaded/blob/master/src/contentloaded.js" title="https://github.com/dperini/ContentLoaded/blob/master/src/contentloaded.js">contentloaded.js</a> (supports only one listener) and <a href="https://github.com/addyosmani/jquery.parts/blob/master/jquery.documentReady.js" title="https://github.com/addyosmani/jquery.parts/blob/master/jquery.documentReady.js">jquery.documentReady.js</a> (doesn't depend on jQuery, despite its name).</p> +{{Compat("api.Window.DOMContentLoaded_event")}} <h2 id="Related_Events">Related Events</h2> 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); <h2 id="瀏覽器相容性">瀏覽器相容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>pseudo-element support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9</td> - <td>15</td> - <td>{{CompatVersionUnknown}} </td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>WP7 Mango</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - <tr> - <td>pseudo-element support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.getComputedStyle")}} <h2 id="規範">規範</h2> 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 { <h3 id="See_also">See also</h3> <p><a href="/en/DOM/Manipulating_the_browser_history" title="en/DOM/Manipulating the browser history">Manipulating the browser history</a></p> <h3 id="Browser_Compatibility" name="Browser_Compatibility">Browser compatibility</h3> -<p>{{ CompatibilityTable() }}</p> -<div id="compat-desktop"> - <table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> - </table> -</div> -<div id="compat-mobile"> - <table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> - </table> -</div> -<h3 id="Specification" name="Specification">Specification</h3> -<p>HTML Specification: <var>window</var> . <code title="dom-location"><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#dom-location">location</a></code></p> -<p>{{ languages( { "fr": "fr/DOM/window.location", "ja": "ja/DOM/window.location" } ) }}</p> +{{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 <h2 id="Browser_compatibility" name="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(47)}}</td> - <td>{{CompatGeckoDesktop(53)}} [1]</td> - <td>{{CompatNo}}</td> - <td>{{CompatOpera(34)}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android Webview</th> - <th>Chrome for Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatChrome(47)}}</td> - <td>{{CompatChrome(47)}}</td> - <td>{{CompatGeckoMobile(53)}} [1]</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] <code>requestIdleCallback()</code> is implemented in Firefox 53 but is disabled by default; to enable it, set the preference <code>dom.requestIdleCallback.enabled</code> to <code>true</code>. It is enabled by default starting in Firefox 55.</p> +{{Compat("api.Window.requestIdleCallback")}} <h2 id="See_also">See also</h2> |