diff options
author | YujiSoftware <yuji.software+github@gmail.com> | 2022-03-02 20:22:51 +0900 |
---|---|---|
committer | Irvin <irvinfly@gmail.com> | 2022-03-04 01:03:17 +0800 |
commit | 9a110dee28ae2ef12ee014b98fda6bae6ee48edb (patch) | |
tree | 6525763f4313d7d8f42aefa699765f61ee1c63df /files/zh-cn/web/api/window | |
parent | eeddb651b6e8deb8ecabc2bc5bc28c8ead25cca5 (diff) | |
download | translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.gz translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.tar.bz2 translated-content-9a110dee28ae2ef12ee014b98fda6bae6ee48edb.zip |
Migrate to Compat macro (zh-cn)
Diffstat (limited to 'files/zh-cn/web/api/window')
19 files changed, 22 insertions, 971 deletions
diff --git a/files/zh-cn/web/api/window/cancelanimationframe/index.html b/files/zh-cn/web/api/window/cancelanimationframe/index.html index 0d98e5db24..95d38eb70f 100644 --- a/files/zh-cn/web/api/window/cancelanimationframe/index.html +++ b/files/zh-cn/web/api/window/cancelanimationframe/index.html @@ -45,65 +45,7 @@ window.cancelAnimationFrame(myReq); <h2 id="Browser_Compatibility" name="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> - <p>21.0 {{ property_prefix("webkit") }}</p> - - <p>24.0 脱前缀</p> - </td> - <td> - <p>{{ CompatGeckoDesktop("11.0") }} {{ property_prefix("moz") }} </p> - </td> - <td>10</td> - <td>{{ CompatUnknown() }}</td> - <td> - <p>6.0 {{ property_prefix("webkit") }}</p> - </td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Chrome for 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> - <p>{{ CompatUnknown() }}</p> - </td> - <td>{{ CompatGeckoMobile("11.0") }} {{ property_prefix("moz") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.cancelAnimationFrame")}} <h2 id="Specification" name="Specification">规范</h2> diff --git a/files/zh-cn/web/api/window/cancelidlecallback/index.html b/files/zh-cn/web/api/window/cancelidlecallback/index.html index 79abf32d93..17a3405707 100644 --- a/files/zh-cn/web/api/window/cancelidlecallback/index.html +++ b/files/zh-cn/web/api/window/cancelidlecallback/index.html @@ -52,56 +52,4 @@ translation_of: Web/API/Window/cancelIdleCallback <h2 id="Browser_compatibility" name="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)}}<sup>[1]</sup></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 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)}}<sup>[1]</sup></td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Idle callback 在 Firefox 53 中增加, 默认是禁用状态,设置 <code>dom.requestIdleCallback.enabled</code> 为 <code>true</code>启用。 Idle callbacks 再 Firefox 55及之后版本中默认启用。</p> +{{Compat("api.Window.cancelIdleCallback")}} diff --git a/files/zh-cn/web/api/window/clearimmediate/index.html b/files/zh-cn/web/api/window/clearimmediate/index.html index 84d84226e6..426f7869db 100644 --- a/files/zh-cn/web/api/window/clearimmediate/index.html +++ b/files/zh-cn/web/api/window/clearimmediate/index.html @@ -22,51 +22,8 @@ document.getElementById("button").addEventListener(function () { }, false); </pre> <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>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatVersionUnknown() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</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>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> - </table> -</div> +{{Compat("api.Window.clearImmediate")}} + <h2 id="相关链接">相关链接</h2> <p>{{ domxref("window.setImmediate") }}</p> <p>{{ spec("https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html", "Specification: Efficient Script Yielding") }}</p> diff --git a/files/zh-cn/web/api/window/deviceorientation_event/index.html b/files/zh-cn/web/api/window/deviceorientation_event/index.html index 4b36867f04..7c7ff74ad0 100644 --- a/files/zh-cn/web/api/window/deviceorientation_event/index.html +++ b/files/zh-cn/web/api/window/deviceorientation_event/index.html @@ -98,55 +98,7 @@ var handleOrientationEvent = function(frontToBack, leftToRight, rotateDegrees) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>功能</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>基本功能支持</td> - <td>7.0</td> - <td>3.6<sup>[1]</sup></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>功能</th> - <th>Android</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>基本功能支持</td> - <td>3.0</td> - <td>3.6<sup>[1]</sup></td> - <td>{{CompatNo}}</td> - <td>12</td> - <td>4.2</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Firefox 3.6, 4, 和 5 支持 <a href="/en-US/docs/Web/Events/MozOrientation">mozOrientation</a> 这一类似 <code>DeviceOrientation</code> 的事件。</p> +{{Compat("api.Window.deviceorientation_event")}} <h2 id="相关事件">相关事件</h2> diff --git a/files/zh-cn/web/api/window/event/index.html b/files/zh-cn/web/api/window/event/index.html index a46da74b26..77a9af1b10 100644 --- a/files/zh-cn/web/api/window/event/index.html +++ b/files/zh-cn/web/api/window/event/index.html @@ -23,59 +23,7 @@ translation_of: Web/API/Window/event <h2 id="Browser_Compatibility" name="Browser_Compatibility">浏览器兼容性</h2> -<p>{{ CompatibilityTable() }} </p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Chrome</th> - <th>Edge</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>基本支持</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatNo() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Android</th> - <th>Edge</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Phone</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome Mobile</th> - </tr> - <tr> - <td>基本支持</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.event")}} <h2 id="更多资料">更多资料</h2> diff --git a/files/zh-cn/web/api/window/frameelement/index.html b/files/zh-cn/web/api/window/frameelement/index.html index 12c587d725..f6ed8cca2a 100644 --- a/files/zh-cn/web/api/window/frameelement/index.html +++ b/files/zh-cn/web/api/window/frameelement/index.html @@ -25,49 +25,4 @@ if (frameEl) <h3 id="Specification" name="Specification">规范</h3> <p><a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/#dom-frameelement" title="http://www.whatwg.org/specs/web-apps/current-work/#dom-frameelement">WHATWG</a></p> <h3 id="浏览器兼容性">浏览器兼容性</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</th> - </tr> - <tr> - <td>Basic support</td> - <td>18</td> - <td>{{ CompatGeckoDesktop("1") }}</td> - <td>5.5?</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 Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatGeckoDesktop("1") }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - <td>{{ CompatUnknown() }}</td> - </tr> - </tbody> - </table> -</div> -<p>{{ languages( { "ja": "ja/DOM/window.frameElement", "pl": "pl/DOM/window.frameElement", "en": "en/DOM/window.frameElement" } ) }}</p> +{{Compat("api.Window.frameElement")}} diff --git a/files/zh-cn/web/api/window/getdefaultcomputedstyle/index.html b/files/zh-cn/web/api/window/getdefaultcomputedstyle/index.html index 2ec99a1b9a..932bc91e8e 100644 --- a/files/zh-cn/web/api/window/getdefaultcomputedstyle/index.html +++ b/files/zh-cn/web/api/window/getdefaultcomputedstyle/index.html @@ -79,66 +79,4 @@ var style = window.getDefaultComputedStyle(elem1); <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>{{CompatNo}}</td> - <td>19</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>pseudo-element support</td> - <td>{{CompatNo}}</td> - <td>19</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</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>{{CompatNo}}</td> - <td>19</td> - <td>7.5</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td>pseudo-element support</td> - <td>{{CompatNo}}</td> - <td>19</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.getDefaultComputedStyle")}} diff --git a/files/zh-cn/web/api/window/innerheight/index.html b/files/zh-cn/web/api/window/innerheight/index.html index d177fd0cd7..19531d83d5 100644 --- a/files/zh-cn/web/api/window/innerheight/index.html +++ b/files/zh-cn/web/api/window/innerheight/index.html @@ -57,57 +57,7 @@ var intOuterFramesetHeight = top.innerHeight; <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<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>1</td> - <td>{{CompatGeckoDesktop(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</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>1</td> - <td>{{CompatGeckoMobile(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</td> - </tr> - </tbody> -</table> -</div> - -<h3 id="Gecko_note" name="Gecko_note">Gecko 备注</h3> - -<p>从 Firefox 4 到 Firefox 24,该属性有 bug,而且某种情况下,会在页面加载前给出一个错误的值,查看 {{bug(641188)}}。</p> +{{Compat("api.Window.innerHeight")}} <h2 id="Standards_information" name="Standards_information">标准相关信息</h2> diff --git a/files/zh-cn/web/api/window/languagechange_event/index.html b/files/zh-cn/web/api/window/languagechange_event/index.html index 953a16707d..af76994cd1 100644 --- a/files/zh-cn/web/api/window/languagechange_event/index.html +++ b/files/zh-cn/web/api/window/languagechange_event/index.html @@ -63,55 +63,7 @@ translation_of: Web/API/Window/languagechange_event <h2 id="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</th> - </tr> - <tr> - <td>Basic support</td> - <td>37</td> - <td>{{ CompatGeckoDesktop("32") }} [1]</td> - <td>{{ CompatNo() }}</td> - <td>24</td> - <td>{{ CompatNo() }}</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>{{ CompatNo() }}</td> - <td>{{ CompatGeckoMobile("32") }}[1]</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1]In Firefox, the <code>navigator.languages</code> property's value is taken from the <code>intl.accept_languages</code> preference.</p> +{{Compat("api.Window.languagechange_event")}} <h2 id="See_also" name="See_also">See also</h2> diff --git a/files/zh-cn/web/api/window/onappinstalled/index.html b/files/zh-cn/web/api/window/onappinstalled/index.html index bbf2065738..21662ca3f6 100644 --- a/files/zh-cn/web/api/window/onappinstalled/index.html +++ b/files/zh-cn/web/api/window/onappinstalled/index.html @@ -39,59 +39,7 @@ translation_of: Web/API/Window/onappinstalled <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<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>{{CompatGeckoDesktop(49)}} [1]</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>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatGeckoMobile(49)}} [1]</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] This feature is behind a feature preference setting. In about:config, set <code>dom.manifest.onappinstall</code> to <code>true</code>.</p> +{{Compat("api.Window.onappinstalled")}} <h2 id="See_also" name="See_also">相关文章</h2> diff --git a/files/zh-cn/web/api/window/onbeforeinstallprompt/index.html b/files/zh-cn/web/api/window/onbeforeinstallprompt/index.html index e2243375f7..9fe0053476 100644 --- a/files/zh-cn/web/api/window/onbeforeinstallprompt/index.html +++ b/files/zh-cn/web/api/window/onbeforeinstallprompt/index.html @@ -37,59 +37,7 @@ window.addEventListener("beforeinstallprompt", function(e) { <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>{{CompatChrome(45.0)}} [1]</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Android</th> - <th>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{ CompatNo() }}</td> - <td>{{CompatChrome(45.0)}} [1]</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{ CompatNo() }}</td> - <td>{{CompatChrome(45.0)}} [1]</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Behind the flagchrome://flags/#bypass-app-banner-engagement-checks</p> +{{Compat("api.Window.onbeforeinstallprompt")}} <h2 id="规范">规范</h2> diff --git a/files/zh-cn/web/api/window/outerheight/index.html b/files/zh-cn/web/api/window/outerheight/index.html index 9bc6b127af..fe528e036f 100644 --- a/files/zh-cn/web/api/window/outerheight/index.html +++ b/files/zh-cn/web/api/window/outerheight/index.html @@ -20,51 +20,8 @@ translation_of: Web/API/Window/outerHeight <p><img alt="innerHeight vs outerHeight illustration" src="/@api/deki/files/213/=FirefoxInnerVsOuterHeight2.png" style=""></p> <h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2> <div> - {{CompatibilityTable}}</div> -<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>1</td> - <td>{{CompatGeckoDesktop(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</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>1</td> - <td>{{CompatGeckoMobile(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</td> - </tr> - </tbody> - </table> -</div> +{{Compat("api.Window.outerHeight")}} + <h2 id="Specification" name="Specification">规范</h2> <p>DOM Level 0。不属于任何 W3C 技术规范或推荐。</p> <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/window/outerwidth/index.html b/files/zh-cn/web/api/window/outerwidth/index.html index fc7a7ca3db..9f089c22db 100644 --- a/files/zh-cn/web/api/window/outerwidth/index.html +++ b/files/zh-cn/web/api/window/outerwidth/index.html @@ -17,51 +17,8 @@ translation_of: Web/API/Window/outerWidth <p>要获取一个窗口的内层宽度(inner width),即页面被展示的区域,请参考 {{domxref("window.innerWidth")}}。</p> <h2 id="浏览器兼容性">浏览器兼容性</h2> <div> - {{CompatibilityTable}}</div> -<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>1</td> - <td>{{CompatGeckoDesktop(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</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>1</td> - <td>{{CompatGeckoMobile(1.0)}}</td> - <td>9</td> - <td>9</td> - <td>3</td> - </tr> - </tbody> - </table> -</div> +{{Compat("api.Window.outerWidth")}} + <h2 id="Specification" name="Specification">规范</h2> <p>DOM Level 0。不属于任何 W3C 技术规范或推荐。<span class="comment">the To do in Notes</span></p> <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/window/pageshow_event/index.html b/files/zh-cn/web/api/window/pageshow_event/index.html index 482e1b567e..c733985525 100644 --- a/files/zh-cn/web/api/window/pageshow_event/index.html +++ b/files/zh-cn/web/api/window/pageshow_event/index.html @@ -86,55 +86,7 @@ window.addEventListener('load', function() { <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>{{CompatChrome("4")}}</td> - <td>{{CompatGeckoDesktop("1.8")}}</td> - <td>11</td> - <td>15</td> - <td>5</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>2.3</td> - <td>{{CompatUnknown()}}</td> - <td>11</td> - <td>35</td> - <td>5.1</td> - </tr> - </tbody> -</table> - - -</div> +{{Compat("api.Window.pageshow_event")}} <h2 id="相关事件">相关事件</h2> diff --git a/files/zh-cn/web/api/window/pagexoffset/index.html b/files/zh-cn/web/api/window/pagexoffset/index.html index d6f823e4a4..0602fcf0a8 100644 --- a/files/zh-cn/web/api/window/pagexoffset/index.html +++ b/files/zh-cn/web/api/window/pagexoffset/index.html @@ -31,59 +31,7 @@ translation_of: Web/API/Window/pageXOffset <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 (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9</td> - <td>{{CompatVersionUnknown}}</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>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.pageXOffset")}} <h2 id="See_also" name="See_also">相关链接</h2> diff --git a/files/zh-cn/web/api/window/pageyoffset/index.html b/files/zh-cn/web/api/window/pageyoffset/index.html index acef4e640d..04bbe0a9c0 100644 --- a/files/zh-cn/web/api/window/pageyoffset/index.html +++ b/files/zh-cn/web/api/window/pageyoffset/index.html @@ -31,59 +31,7 @@ translation_of: Web/API/Window/pageYOffset <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 (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>9</td> - <td>{{CompatVersionUnknown}}</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>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.pageYOffset")}} <h2 id="See_also" name="See_also">相关链接</h2> diff --git a/files/zh-cn/web/api/window/popstate_event/index.html b/files/zh-cn/web/api/window/popstate_event/index.html index ef4c63f871..22abea92ba 100644 --- a/files/zh-cn/web/api/window/popstate_event/index.html +++ b/files/zh-cn/web/api/window/popstate_event/index.html @@ -69,53 +69,7 @@ translation_of: Web/API/Window/popstate_event <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>Yes</td> - <td>{{ CompatGeckoDesktop("2") }}</td> - <td>10.0</td> - <td>Yes</td> - <td>limited</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>3.0 (buggy in 2.2 and 2.3)</td> - <td>{{ CompatGeckoMobile("2") }}</td> - <td>10.0</td> - <td>Yes</td> - <td>limited</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.popstate_event")}} <h2 id="示例">示例</h2> diff --git a/files/zh-cn/web/api/window/scrolly/index.html b/files/zh-cn/web/api/window/scrolly/index.html index 7bc49120f2..db80b74933 100644 --- a/files/zh-cn/web/api/window/scrolly/index.html +++ b/files/zh-cn/web/api/window/scrolly/index.html @@ -69,60 +69,7 @@ var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documen <div id="compat-desktop"> <h2 id="Browser_compatibility">Browser compatibility</h2> -<p>{{CompatibilityTable}}</p> - -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Chrome</th> - <th>Firefox (Gecko)</th> - <th>Internet Explorer</th> - <th>Microsoft Edge</th> - <th>Opera</th> - <th>Safari (WebKit)</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatVersionUnknown}}</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>Android Webview</th> - <th>Firefox Mobile (Gecko)</th> - <th>Firefox OS</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - <th>Chrome for Android</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatVersionUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.scrollY")}} <h2 id="See_also" name="See_also">相关链接</h2> diff --git a/files/zh-cn/web/api/window/visualviewport/index.html b/files/zh-cn/web/api/window/visualviewport/index.html index bc751840d9..1c0c30fc68 100644 --- a/files/zh-cn/web/api/window/visualviewport/index.html +++ b/files/zh-cn/web/api/window/visualviewport/index.html @@ -36,54 +36,4 @@ translation_of: Web/API/Window/visualViewport <h2 id="浏览器兼容性">浏览器兼容性</h2> -<div>{{CompatibilityTable}}</div> - -<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(60)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOpera(47)}}</td> - <td>{{CompatUnknown}}</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(60)}}</td> - <td>{{CompatChrome(60)}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatUnknown}}</td> - <td>{{CompatOperaMobile(47)}}</td> - <td>{{CompatUnknown}}</td> - </tr> - </tbody> -</table> -</div> +{{Compat("api.Window.visualViewport")}} |