Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace standard-table with macros (Part 1) #5782

Merged
merged 2 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/abortcontroller/abort/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,7 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#dom-abortcontroller-abort', 'abort()')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/abortcontroller/abortcontroller/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,7 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#dom-abortcontroller-abortcontroller', 'AbortController()')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
35 changes: 8 additions & 27 deletions files/zh-cn/web/api/abortcontroller/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ <h2 id="构造函数">构造函数</h2>

<dl>
<dt>{{domxref("AbortController.AbortController()")}}</dt>
<dd><font>创建一个新的</font> <code>AbortController</code> <font>对象实例。</font></dd>
<dd>创建一个新的 <code>AbortController</code> 对象实例。</dd>
</dl>

<h2 id="属性">属性</h2>

<dl>
<dt>{{domxref("AbortController.signal")}} {{readonlyInline}}</dt>
<dd><font>返回一个</font> {{domxref("AbortSignal")}} <font>对象实例,</font>它可以用来 with/abort 一个 Web(网络)请求。</dd>
<dd>返回一个 {{domxref("AbortSignal")}} 对象实例,它可以用来 with/abort 一个 Web(网络)请求。</dd>
</dl>

<h2 id="方法">方法</h2>
Expand All @@ -38,11 +38,11 @@ <h2 id="方法">方法</h2>

<h2 id="示例">示例</h2>

<p><font>在下面的代码片段中,我们想通过</font> <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> 下载一段视频。</p>
<p>在下面的代码片段中,我们想通过 <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a> 下载一段视频。</p>

<p><font>我们先使用</font> {{domxref("AbortController.AbortController","AbortController()")}} 构造函数<font>创建一个控制器,然后使用</font> {{domxref("AbortController.signal")}} 属性<font>获取其关联</font> {{domxref("AbortSignal")}} 对象的引用。</p>
<p>我们先使用 {{domxref("AbortController.AbortController","AbortController()")}} 构造函数创建一个控制器,然后使用 {{domxref("AbortController.signal")}} 属性获取其关联 {{domxref("AbortSignal")}} 对象的引用。</p>

<p>当一个 <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> 初始化,我们把 <code>AbortSignal</code> 作为一个选项传递到到请求对象(如下 <code>{ signal }</code>)。这将 <code>signal<code> 和 <code>controller<code> 与这个 <code>fetch request</code> 相关联,然后允许我们通过调用 {{domxref("AbortController.abort()")}} 中止请求,如下第二个事件监听函数。</p>
<p>当一个 <a href="https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch">fetch request</a> 初始化,我们把 <code>AbortSignal</code> 作为一个选项传递到到请求对象(如下 <code>{ signal }</code>)。这将 <code>signal</code> 和 <code>controller</code> 与这个 <code>fetch request</code> 相关联,然后允许我们通过调用 {{domxref("AbortController.abort()")}} 中止请求,如下第二个事件监听函数。</p>
Copy link
Member Author

@yin1999 yin1999 May 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct those <code> tag. Or the {{Specifications}} and {{Compat}} macros are not working.


<pre class="brush: js notranslate">const controller = new AbortController();
let signal = controller.signal;
Expand Down Expand Up @@ -74,34 +74,15 @@ <h2 id="示例">示例</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#interface-abortcontroller', 'AbortController')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容">浏览器兼容</h2>



<p>{{Compat("api.AbortController")}}</p>
{{Compat}}

<h2 id="参见">参见</h2>

<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">Fetch API</a></li>
<li><a href="https://developers.google.com/web/updates/2017/09/abortable-fetch">Abortable Fetch</a> by Jake Archibald</li>
<li><a href="https://developers.google.com/web/updates/2017/09/abortable-fetch">Abortable Fetch</a> by Jake Archibald</li>
</ul>

<div id="gtx-trans" style="position: absolute; left: 542px; top: 1890px;">
<div class="gtx-trans-icon"></div>
</div>
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/abortsignal/abort_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,7 @@ <h2 id="示例">示例</h2>

<h2 id="规格">规格</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">规格</th>
<th scope="col">状态</th>
<th scope="col">标注</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#dom-abortsignal-aborted', 'onabort')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/abortsignal/aborted/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,7 @@ <h2 id="示例">示例</h2>

<h2 id="规格">规格</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">规格</th>
<th scope="col">状态</th>
<th scope="col">备注</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#dom-abortsignal-onabort', 'onabort')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/abortsignal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,7 @@ <h2 id="示例">示例</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('DOM WHATWG', '#interface-AbortSignal', 'AbortSignal')}}</td>
<td>{{Spec2('DOM WHATWG')}}</td>
<td>Initial definition</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
20 changes: 1 addition & 19 deletions files/zh-cn/web/api/accelerometer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,25 +44,7 @@ <h2 id="Example">Example</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Generic Sensor')}}</td>
<td>{{Spec2('Generic Sensor')}}</td>
<td>Defines sensors in general.</td>
</tr>
<tr>
<td>{{SpecName('Accelerometer','#accelerometer-interface','Accelerometer')}}</td>
<td>{{Spec2('Accelerometer')}}</td>
<td> </td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,7 @@ <h3 id="参数">参数</h3>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('AmbientLight','#dom-ambientlightsensor-ambientlightsensor','AmbinentLightSensor()')}}</td>
<td>{{Spec2('AmbientLight')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/ambientlightsensor/illuminance/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,7 @@ <h2 id="用例">用例</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('AmbientLight')}}</td>
<td>{{Spec2('AmbientLight')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
17 changes: 3 additions & 14 deletions files/zh-cn/web/api/ambientlightsensor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,9 @@ <h3 id="Examples">Examples</h3>

<pre class="brush: js">// TBD</pre>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('AmbientLight','#ambient-light-sensor-interface','AmbientLightSensor')}}</td>
<td>{{Spec2('AmbientLight')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<h2 id="规范">规范</h2>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add <h2> tag to keep it in a new block.


{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/analysernode/analysernode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,7 @@ <h3 id="返回值">返回值</h3>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API','#the-analysernode-interface','AnalyserNode')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="Browser_Compatibility">Browser Compatibility</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/analysernode/fftsize/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,7 @@ <h2 id="例子">例子</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API', '#widl-AnalyserNode-fftSize', 'fftSize')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td> </td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
15 changes: 1 addition & 14 deletions files/zh-cn/web/api/analysernode/frequencybincount/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,7 @@ <h2 id="例子">例子</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API', '#widl-AnalyserNode-frequencyBinCount', 'frequencyBinCount')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td> </td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,7 @@ <h2 id="参数">参数</h2>

<h2 id="规范">规范</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API', '#widl-AnalyserNode-getByteFrequencyData-void-Uint8Array-array', 'getByteFrequencyData()')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td> </td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,7 @@ <h2 id="例子">例子</h2>

<h2 id="规格">规格</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('Web Audio API', '#widl-AnalyserNode-getByteTimeDomainData-void-Uint8Array-array', 'getByteTimeDomainData()')}}</td>
<td>{{Spec2('Web Audio API')}}</td>
<td> </td>
</tr>
</tbody>
</table>
{{Specifications}}

<h2 id="浏览器兼容性">浏览器兼容性</h2>

Expand Down
Loading