diff options
Diffstat (limited to 'files/zh-tw/web/api/errorevent/index.html')
-rw-r--r-- | files/zh-tw/web/api/errorevent/index.html | 148 |
1 files changed, 148 insertions, 0 deletions
diff --git a/files/zh-tw/web/api/errorevent/index.html b/files/zh-tw/web/api/errorevent/index.html new file mode 100644 index 0000000000..27e406ed7c --- /dev/null +++ b/files/zh-tw/web/api/errorevent/index.html @@ -0,0 +1,148 @@ +--- +title: ErrorEvent +slug: Web/API/ErrorEvent +translation_of: Web/API/ErrorEvent +--- +<p>{{APIRef("HTML DOM")}}</p> + +<p><strong><code>ErrorEvent</code></strong> 介面是用來提供程式碼或是檔案的錯誤訊息的事件。</p> + +<h2 id="Properties">Properties</h2> + +<p><em>此介面繼承了其父 {{domxref("Event")}} 的 properties 。</em></p> + +<dl> + <dt>{{domxref("ErrorEvent.message")}} {{readonlyInline}}</dt> + <dd>一 {{domxref("DOMString")}} 提供具可讀性的關於問題的錯誤訊息。</dd> + <dt>{{domxref("ErrorEvent.filename")}} {{readonlyInline}}</dt> + <dd>一 {{domxref("DOMString")}} ,為發生錯誤的程式碼檔案的檔名。</dd> + <dt>{{domxref("ErrorEvent.lineno")}} {{readonlyInline}}</dt> + <dd>一 <code>整數</code> ,為發生問題的程式的行數。</dd> + <dt>{{domxref("ErrorEvent.colno")}} {{readonlyInline}}</dt> + <dd>一 <code>整數</code> ,為發生問題的程式的欄數。</dd> + <dt>{{domxref("ErrorEvent.error")}} {{readonlyInline}} {{experimental_inline}}</dt> + <dd>一個參與該事件的 JavaScript <code>Object</code> 。</dd> +</dl> + +<h2 id="Constructor">Constructor</h2> + +<dl> + <dt>{{domxref("ErrorEvent.ErrorEvent", "ErrorEvent()")}}</dt> + <dd>建立一 <code>ErrorEvent</code> 事件,其包含提供的參數。</dd> +</dl> + +<h2 id="Methods">Methods</h2> + +<p><em>此介面繼承了其父 {{domxref("Event")}} 的 methods。</em></p> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{ SpecName('HTML WHATWG', 'webappapis.html#the-errorevent-interface', 'ErrorEvent') }}</td> + <td>{{ Spec2('HTML WHATWG') }}</td> + <td>追加 <code>error</code> propriety 以及 constructor 的第5個the 5th 參數。</td> + </tr> + <tr> + <td>{{ SpecName('HTML5 W3C', 'webappapis.html#the-errorevent-interface', 'ErrorEvent') }}</td> + <td>{{ Spec2('HTML5 W3C') }}</td> + <td>初始定義。</td> + </tr> + </tbody> +</table> + +<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>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>colno</code> property and 4th argument to constructor</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + <tr> + <td><code>error</code> property and 5th argument to constructor</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</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>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>colno</code> property and 4th argument to constructor</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + </tr> + <tr> + <td><code>error</code> property and 5th argument to constructor</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatNo}}</td> + </tr> + </tbody> +</table> +</div> + +<h2 id="延伸閱讀">延伸閱讀</h2> + +<ul> + <li><a href="/en-US/docs/Web/Guide/Performance/Using_web_workers" title="/en-US/docs/Web/Guide/Performance/Using_web_workers">Using web workers</a>, most likely objects to raise such an event</li> +</ul> |