aboutsummaryrefslogtreecommitdiff
path: root/files/zh-tw/web/api/eventtarget
diff options
context:
space:
mode:
authorYujiSoftware <yuji.software+github@gmail.com>2022-03-02 20:01:54 +0900
committerIrvin <irvinfly@gmail.com>2022-03-04 01:02:45 +0800
commitc46e9da7f68bd682fc9ff1452b7fe63df1227151 (patch)
treefe6c6e20521b16a22ec64755b88a39effd81a4d7 /files/zh-tw/web/api/eventtarget
parente671353fc364cef89441d031e0e8b9300b67951b (diff)
downloadtranslated-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/eventtarget')
-rw-r--r--files/zh-tw/web/api/eventtarget/dispatchevent/index.html54
-rw-r--r--files/zh-tw/web/api/eventtarget/index.html54
-rw-r--r--files/zh-tw/web/api/eventtarget/removeeventlistener/index.html98
3 files changed, 3 insertions, 203 deletions
diff --git a/files/zh-tw/web/api/eventtarget/dispatchevent/index.html b/files/zh-tw/web/api/eventtarget/dispatchevent/index.html
index 8977c22c9e..3eea61b765 100644
--- a/files/zh-tw/web/api/eventtarget/dispatchevent/index.html
+++ b/files/zh-tw/web/api/eventtarget/dispatchevent/index.html
@@ -79,56 +79,4 @@ translation_of: Web/API/EventTarget/dispatchEvent
<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>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari (WebKit)</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>4</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>2</td>
- <td>9 [1]</td>
- <td>9.64 (probably earlier)</td>
- <td>3.2 (probably earlier)</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 Phone</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</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>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1]:早期的 IE 版本只支持 IE 特有的 {{domxref("EventTarget.fireEvent()")}} 方法來觸發事件。</p>
+{{Compat("api.EventTarget.dispatchEvent")}}
diff --git a/files/zh-tw/web/api/eventtarget/index.html b/files/zh-tw/web/api/eventtarget/index.html
index 4c10aa133e..138411c1b5 100644
--- a/files/zh-tw/web/api/eventtarget/index.html
+++ b/files/zh-tw/web/api/eventtarget/index.html
@@ -114,59 +114,7 @@ EventTarget.prototype.dispatchEvent = function(event) {
<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>Edge</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari (WebKit)</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>1.0</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoDesktop("1")}}</td>
- <td>9.0</td>
- <td>7</td>
- <td>1.0<sup>[1]</sup></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>1.0</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("1")}}</td>
- <td>9.0</td>
- <td>6.0</td>
- <td>1.0</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] <code>window.EventTarget</code> does not exist.</p>
+{{Compat("api.EventTarget")}}
<h2 id="參見">參見</h2>
diff --git a/files/zh-tw/web/api/eventtarget/removeeventlistener/index.html b/files/zh-tw/web/api/eventtarget/removeeventlistener/index.html
index 136aa0cf58..2876236b40 100644
--- a/files/zh-tw/web/api/eventtarget/removeeventlistener/index.html
+++ b/files/zh-tw/web/api/eventtarget/removeeventlistener/index.html
@@ -113,103 +113,7 @@ mouseOverTarget.addEventListener('mouseover', 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 (WebKit)</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>1.0<sup>[1][2]</sup></td>
- <td>{{CompatGeckoDesktop("1")}}<sup>[3]</sup></td>
- <td>9.0</td>
- <td>7<sup>[4]</sup></td>
- <td>1.0<sup>[1]</sup></td>
- </tr>
- <tr>
- <td><code>useCapture</code> made optional</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>6.0</td>
- <td>9.0</td>
- <td>11.60</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td><code>options</code> parameter</td>
- <td>{{CompatChrome(49.0)}}</td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </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>1.0<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}<sup>[2]</sup></td>
- <td>{{CompatGeckoMobile("1")}}<sup>[3]</sup></td>
- <td>9.0</td>
- <td>6.0<sup>[4]</sup></td>
- <td>1.0<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}<sup>[2]</sup></td>
- </tr>
- <tr>
- <td><code>useCapture</code> made optional</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- <tr>
- <td><code>options</code> parameter</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome(49.0)}}</td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td>{{CompatChrome(49.0)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] Although WebKit explicitly added "<code>[optional]</code>" to the <code>useCapture</code> parameter for Safari 5.1 and Chrome 13, it had been working before the change.</p>
-
-<p>[2] Before Chrome 49, the type and listener parameters were optional.</p>
-
-<p>[2] Prior to Firefox 6, the browser would throw an exception if the <code>useCapture</code> parameter was not explicitly <code>false</code>. Prior to Gecko 9.0 {{geckoRelease("9.0")}}, <code>addEventListener()</code> would throw an exception if the listener parameter was <code>null</code>; now the method returns without error, but without doing anything.</p>
-
-<p>[4] Opera 11.60 made the <code>useCapture</code> parameter optional (<a href="http://my.opera.com/ODIN/blog/2011/09/29/what-s-new-in-opera-development-snapshots-28-september-2011-edition">source</a>).</p>
-
-<p>[5] For backwards compatibility, browsers that support <code>options</code> allow the third parameter to be either <code>options</code> or <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean" title="The Boolean object is an object wrapper for a boolean value."><code>Boolean</code></a>.</p>
+{{Compat("api.EventTarget.removeEventListener")}}
<h2 id="Polyfill_to_support_older_browsers">Polyfill to support older browsers</h2>