diff options
Diffstat (limited to 'files/zh-cn/web/api/filereader')
-rw-r--r-- | files/zh-cn/web/api/filereader/abort/index.html | 54 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/error/index.html | 54 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/index.html | 92 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/readasarraybuffer/index.html | 54 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/readasbinarystring/index.html | 54 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/readastext/index.html | 56 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/readystate/index.html | 54 | ||||
-rw-r--r-- | files/zh-cn/web/api/filereader/result/index.html | 54 |
8 files changed, 8 insertions, 464 deletions
diff --git a/files/zh-cn/web/api/filereader/abort/index.html b/files/zh-cn/web/api/filereader/abort/index.html index 195f05b1bb..de474fcc0c 100644 --- a/files/zh-cn/web/api/filereader/abort/index.html +++ b/files/zh-cn/web/api/filereader/abort/index.html @@ -37,59 +37,7 @@ translation_of: Web/API/FileReader/abort <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在Gecko 2.0 beta 7 (Firefox 4.0 beta 7)之前,上述方法中所有的 {{domxref("Blob")}} 参数都只能是一个 {{domxref("File")}} 对象。根据最新的 FileAPI 草案,现在的所有的 {{domxref("Blob")}} 参数既可以是<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("Blob")}} 对象也可以是一个<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("File")}} 对象。在Gecko 13.0 {{geckoRelease("13.0")}} 之前,FileReader.error 属性会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/FileError">FileError</a> 对象。根据最新的FileAPI草案,现在的 FileReader.error会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/DOMError">DOMError</a> 对象。</p> - -<p>[2] IE9有一个 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.</p> - -<p>[3] Opera从11.10开始 <a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a> .</p> +{{Compat("api.FileReader.abort")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/error/index.html b/files/zh-cn/web/api/filereader/error/index.html index 056b44219c..a6e171ad5b 100644 --- a/files/zh-cn/web/api/filereader/error/index.html +++ b/files/zh-cn/web/api/filereader/error/index.html @@ -35,59 +35,7 @@ translation_of: Web/API/FileReader/error <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在Gecko 2.0 beta 7 (Firefox 4.0 beta 7)之前,上述方法中所有的 {{domxref("Blob")}} 参数都只能是一个 {{domxref("File")}} 对象。根据最新的 FileAPI 草案,现在的所有的 {{domxref("Blob")}} 参数既可以是<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("Blob")}} 对象也可以是一个<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("File")}} 对象。在Gecko 13.0 {{geckoRelease("13.0")}} 之前,FileReader.error 属性会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/FileError">FileError</a> 对象。根据最新的FileAPI草案,现在的 FileReader.error会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/DOMError">DOMError</a> 对象。</p> - -<p>[2] IE9有一个 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.</p> - -<p>[3] Opera从11.10开始 <a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a> .</p> +{{Compat("api.FileReader.error")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/index.html b/files/zh-cn/web/api/filereader/index.html index 316b42f53e..331522ab36 100644 --- a/files/zh-cn/web/api/filereader/index.html +++ b/files/zh-cn/web/api/filereader/index.html @@ -119,97 +119,7 @@ translation_of: Web/API/FileReader <h2 id="浏览器兼容">浏览器兼容</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Edge</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>{{CompatVersionUnknown}}</td> - <td>10</td> - <td>12.02<sup>[2]</sup></td> - <td>6.0</td> - </tr> - <tr> - <td>Support in Web Workers</td> - <td>{{CompatGeckoDesktop(46)}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td><code>error</code> property uses {{domxref("DOMException")}}, not {{domxref("DOMError")}}</td> - <td>{{CompatGeckoDesktop(58)}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>Edge</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>{{CompatVersionUnknown}}</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - <tr> - <td>Support in Web Workers</td> - <td>{{CompatGeckoMobile(46)}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatVersionUnknown}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - </tr> - <tr> - <td><code>error</code> property uses {{domxref("DOMException")}}, not {{domxref("DOMError")}}</td> - <td>{{CompatGeckoMobile(58)}}</td> - <td>{{CompatUnknown()}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - <td>{{CompatVersionUnknown()}}</td> - <td>{{CompatNo}}</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] Prior to Gecko 2.0 beta 7 (Firefox 4.0 beta 7), all {{domxref("Blob")}} parameters below were {{domxref("File")}} parameters; this has since been updated to match the specification correctly. Prior to Gecko 13.0 {{geckoRelease("13.0")}} the <code>FileReader.error</code> property returned a {{domxref("FileError")}} object. This interface has been removed and <code>FileReader.error</code> is now returning the {{domxref("DOMError")}} object as defined in the latest FileAPI draft.</p> - -<p>[2] Opera has <a href="http://www.opera.com/docs/specs/presto28/file/">partial support</a> in 11.1.</p> +{{Compat("api.FileReader")}} <h2 id="See_also" name="See_also">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/readasarraybuffer/index.html b/files/zh-cn/web/api/filereader/readasarraybuffer/index.html index 2d22e8bb1d..6c1ce338aa 100644 --- a/files/zh-cn/web/api/filereader/readasarraybuffer/index.html +++ b/files/zh-cn/web/api/filereader/readasarraybuffer/index.html @@ -37,59 +37,7 @@ translation_of: Web/API/FileReader/readAsArrayBuffer <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在Gecko 2.0 beta 7 (Firefox 4.0 beta 7)之前,上述方法中所有的 {{domxref("Blob")}} 参数都只能是一个 {{domxref("File")}} 对象。根据最新的 FileAPI 草案,现在的所有的 {{domxref("Blob")}} 参数既可以是<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("Blob")}} 对象也可以是一个<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("File")}} 对象。在Gecko 13.0 {{geckoRelease("13.0")}} 之前,FileReader.error 属性会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/FileError">FileError</a> 对象。根据最新的FileAPI草案,现在的 FileReader.error会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/DOMError">DOMError</a> 对象。</p> - -<p>[2] IE9有一个 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.</p> - -<p>[3] Opera从11.10开始 <a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a> .</p> +{{Compat("api.FileReader.readAsArrayBuffer")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/readasbinarystring/index.html b/files/zh-cn/web/api/filereader/readasbinarystring/index.html index 135709795e..7cf6809b3e 100644 --- a/files/zh-cn/web/api/filereader/readasbinarystring/index.html +++ b/files/zh-cn/web/api/filereader/readasbinarystring/index.html @@ -54,59 +54,7 @@ canvas.toBlob(function (blob) { <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>{{CompatNo}}</td> - <td>12.02<sup>[3]</sup></td> - <td>6.0</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.0</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在Gecko 2.0 beta 7 (Firefox 4.0 beta 7)之前,上述方法中所有的 {{domxref("Blob")}} 参数都只能是一个 {{domxref("File")}} 对象。根据最新的 FileAPI 草案,现在的所有的 {{domxref("Blob")}} 参数既可以是<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("Blob")}} 对象也可以是一个<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("File")}} 对象。在Gecko 13.0 {{geckoRelease("13.0")}} 之前,FileReader.error 属性会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/FileError">FileError</a> 对象。根据最新的FileAPI草案,现在的 FileReader.error会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/DOMError">DOMError</a> 对象。</p> - -<p>[2] IE9有一个 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.</p> - -<p>[3] Opera从11.10开始 <a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a> .</p> +{{Compat("api.FileReader.readAsBinaryString")}} <h2 id="相关链接">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/readastext/index.html b/files/zh-cn/web/api/filereader/readastext/index.html index dd9618490f..54ab143d73 100644 --- a/files/zh-cn/web/api/filereader/readastext/index.html +++ b/files/zh-cn/web/api/filereader/readastext/index.html @@ -47,61 +47,7 @@ translation_of: Web/API/FileReader/readAsText <h2 id="兼容性">兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p> </p> - -<p>[1] 在 Gecko 2.0 beta 7 (Firefox 4.0 beta 7) 之前,所有 <a href="/zh-CN/docs/Web/API/File">File</a> 类型,都是<a href="/zh-CN/docs/Web/API/Blob"> Blob</a>类型的一个子集,这已经正确的被纳入到规范里了.在 Gecko 13.0 之前,如果我们错误的传参会导致 FileReader 返回一个<a href="/zh-CN/docs/Web/API/FileError">FileError</a>对象.而<a href="/zh-CN/docs/Web/API/FileError">FileError</a> 这个实例已经从FileReader 规范中被移除了.而在最新的FileAPI 草稿中定义的错误处理机制是返回一个 <a href="/en-US/docs/Web/API/DOMError">DOMError</a> 对象.</p> - -<p>[2] IE9 采用的是 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.实现编码格式化</p> - -<p>[3] 在Opera11.1 版本中只是被<a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a></p> +{{Compat("api.FileReader.readAsText")}} <h2 id="其他文档">其他文档 </h2> diff --git a/files/zh-cn/web/api/filereader/readystate/index.html b/files/zh-cn/web/api/filereader/readystate/index.html index d0d60eacc3..67f040daa7 100644 --- a/files/zh-cn/web/api/filereader/readystate/index.html +++ b/files/zh-cn/web/api/filereader/readystate/index.html @@ -37,59 +37,7 @@ translation_of: Web/API/FileReader/readyState <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>Basic support</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>Feature</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>Basic support</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 在Gecko 2.0 beta 7 (Firefox 4.0 beta 7)之前,上述方法中所有的 {{domxref("Blob")}} 参数都只能是一个 {{domxref("File")}} 对象。根据最新的 FileAPI 草案,现在的所有的 {{domxref("Blob")}} 参数既可以是<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("Blob")}} 对象也可以是一个<font face="Consolas, Liberation Mono, Courier, monospace"> </font>{{domxref("File")}} 对象。在Gecko 13.0 {{geckoRelease("13.0")}} 之前,FileReader.error 属性会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/FileError">FileError</a> 对象。根据最新的FileAPI草案,现在的 FileReader.error会返回一个 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/DOMError">DOMError</a> 对象。</p> - -<p>[2] IE9有一个 <a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>.</p> - -<p>[3] Opera从11.10开始 <a href="http://www.opera.com/docs/specs/presto28/file/">部分支持</a> .</p> +{{Compat("api.FileReader.readyState")}} <h2 id="See_also" name="See_also">相关链接</h2> diff --git a/files/zh-cn/web/api/filereader/result/index.html b/files/zh-cn/web/api/filereader/result/index.html index d459d6af67..efb8699894 100644 --- a/files/zh-cn/web/api/filereader/result/index.html +++ b/files/zh-cn/web/api/filereader/result/index.html @@ -35,59 +35,7 @@ translation_of: Web/API/FileReader/result <h2 id="浏览器兼容性">浏览器兼容性</h2> -<p>{{CompatibilityTable}}</p> - -<div id="compat-desktop"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Firefox (Gecko)</th> - <th>Chrome</th> - <th>Internet Explorer</th> - <th>Opera</th> - <th>Safari</th> - </tr> - <tr> - <td>基本特性支持</td> - <td>{{CompatGeckoDesktop("1.9.2")}}<sup>[1]</sup></td> - <td>7</td> - <td>10<sup>[2]</sup></td> - <td>12.02<sup>[3]</sup></td> - <td>6.0.2</td> - </tr> - </tbody> -</table> -</div> - -<div id="compat-mobile"> -<table class="compat-table"> - <tbody> - <tr> - <th>特性</th> - <th>Firefox Mobile (Gecko)</th> - <th>Android</th> - <th>IE Mobile</th> - <th>Opera Mobile</th> - <th>Safari Mobile</th> - </tr> - <tr> - <td>基本特性支持</td> - <td>32</td> - <td>3</td> - <td>10</td> - <td>11.5</td> - <td>6.1</td> - </tr> - </tbody> -</table> -</div> - -<p>[1] 早于 Gecko 2.0 beta 7 (Firefox 4.0 beta 7)的版本,所有 {{domxref("Blob")}} 的参数归属于 {{domxref("File")}};现在已经更新为正确的技术规范。早于Gecko 13.0 {{geckoRelease("13.0")}} 的版本,<code>FileReader.error</code> 属性返回一个 {{domxref("FileError")}} 对象,这个接口已经被移除。现在根据最新的FileAPI 草案<code>FileReader.error返回一个</code>{{domxref("DOMError")}} 对象。</p> - -<p>[2] IE9拥有<a href="http://html5labs.interoperabilitybridges.com/prototypes/fileapi/fileapi/info">File API Lab</a>。</p> - -<p>[3] Opera 11.1版本拥有<a href="http://www.opera.com/docs/specs/presto28/file/">partial support</a>。</p> +{{Compat("api.FileReader.result")}} <h2 id="参见">参见</h2> |