aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/eventsource
diff options
context:
space:
mode:
authorYujiSoftware <yuji.software+github@gmail.com>2022-03-02 20:22:51 +0900
committerIrvin <irvinfly@gmail.com>2022-03-04 01:03:17 +0800
commit9a110dee28ae2ef12ee014b98fda6bae6ee48edb (patch)
tree6525763f4313d7d8f42aefa699765f61ee1c63df /files/zh-cn/web/api/eventsource
parenteeddb651b6e8deb8ecabc2bc5bc28c8ead25cca5 (diff)
downloadtranslated-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/eventsource')
-rw-r--r--files/zh-cn/web/api/eventsource/close/index.html69
-rw-r--r--files/zh-cn/web/api/eventsource/eventsource/index.html64
-rw-r--r--files/zh-cn/web/api/eventsource/onerror/index.html69
-rw-r--r--files/zh-cn/web/api/eventsource/onopen/index.html69
4 files changed, 4 insertions, 267 deletions
diff --git a/files/zh-cn/web/api/eventsource/close/index.html b/files/zh-cn/web/api/eventsource/close/index.html
index 424e609656..23550a5b62 100644
--- a/files/zh-cn/web/api/eventsource/close/index.html
+++ b/files/zh-cn/web/api/eventsource/close/index.html
@@ -63,74 +63,7 @@ button.onclick = function() {
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<div>{{CompatibilityTable}}</div>
-
-<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>EventSource support</td>
- <td>6</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("6.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>5</td>
- </tr>
- <tr>
- <td>Available in shared and dedicated workers<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("53.0")}}</td>
- <td>{{CompatNo}}</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>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>EventSource support</td>
- <td>4.4</td>
- <td>45</td>
- <td>{{CompatNo}}</td>
- <td>12</td>
- <td>4.1</td>
- </tr>
- <tr>
- <td>Available in shared and dedicated workers<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("53.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] But <a href="https://github.com/w3c/ServiceWorker/issues/947">not service workers as yet</a>.</p>
+{{Compat("api.EventSource.close")}}
<h2 id="相关链接">相关链接</h2>
diff --git a/files/zh-cn/web/api/eventsource/eventsource/index.html b/files/zh-cn/web/api/eventsource/eventsource/index.html
index d228a4768d..d52e79a1dd 100644
--- a/files/zh-cn/web/api/eventsource/eventsource/index.html
+++ b/files/zh-cn/web/api/eventsource/eventsource/index.html
@@ -79,69 +79,7 @@ evtSource.onmessage = 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>9</td>
- <td>{{ CompatGeckoDesktop("6.0") }}</td>
- <td>{{CompatUnknown}}</td>
- <td>11</td>
- <td>5</td>
- </tr>
- <tr>
- <td>CORS support (<code>withCredentials</code>)</td>
- <td>26</td>
- <td>{{ CompatGeckoDesktop("11.0") }}</td>
- <td>{{CompatUnknown}}</td>
- <td>12</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>{{ CompatAndroid("4.4") }}</td>
- <td>{{ CompatGeckoMobile("6.0") }}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- <tr>
- <td>CORS support (<code>withCredentials</code>)</td>
- <td>{{CompatUnknown}}</td>
- <td>{{ CompatGeckoMobile("11.0") }}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
+{{Compat("api.EventSource.EventSource")}}
<h2 id="相关链接">相关链接</h2>
diff --git a/files/zh-cn/web/api/eventsource/onerror/index.html b/files/zh-cn/web/api/eventsource/onerror/index.html
index c7ab46f363..991d194795 100644
--- a/files/zh-cn/web/api/eventsource/onerror/index.html
+++ b/files/zh-cn/web/api/eventsource/onerror/index.html
@@ -47,74 +47,7 @@ original_slug: Server-sent_events/EventSource/onerror
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<div>{{CompatibilityTable}}</div>
-
-<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>EventSource support</td>
- <td>6</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("6.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>5</td>
- </tr>
- <tr>
- <td>Available in shared and dedicated workers<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("53.0")}}</td>
- <td>{{CompatNo}}</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>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>EventSource support</td>
- <td>4.4</td>
- <td>45</td>
- <td>{{CompatNo}}</td>
- <td>12</td>
- <td>4.1</td>
- </tr>
- <tr>
- <td>Available in shared and dedicated workers<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("53.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] But <a href="https://github.com/w3c/ServiceWorker/issues/947">not service workers as yet</a>.</p>
+{{Compat("api.EventSource.onerror")}}
<h2 id="相关链接">相关链接</h2>
diff --git a/files/zh-cn/web/api/eventsource/onopen/index.html b/files/zh-cn/web/api/eventsource/onopen/index.html
index d7b087d023..20ca54d1f4 100644
--- a/files/zh-cn/web/api/eventsource/onopen/index.html
+++ b/files/zh-cn/web/api/eventsource/onopen/index.html
@@ -48,74 +48,7 @@ original_slug: Server-sent_events/EventSource/onopen
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<div>{{CompatibilityTable}}</div>
-
-<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>支持EventSource</td>
- <td>6</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("6.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>5</td>
- </tr>
- <tr>
- <td>在共享和专用的 workers上可用<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatGeckoDesktop("53.0")}}</td>
- <td>{{CompatNo}}</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>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>支持EventSource</td>
- <td>4.4</td>
- <td>45</td>
- <td>{{CompatNo}}</td>
- <td>12</td>
- <td>4.1</td>
- </tr>
- <tr>
- <td>在共享和专用的 workers上可用 <sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("53.0")}}</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] 但 <a href="https://github.com/w3c/ServiceWorker/issues/947">目前不能在service workers上使用</a>.</p>
+{{Compat("api.EventSource.onopen")}}
<h2 id="相关链接">相关链接</h2>