aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/javascript/reference/global_objects/error/filename
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/javascript/reference/global_objects/error/filename
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/error/filename')
-rw-r--r--files/zh-cn/web/javascript/reference/global_objects/error/filename/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/error/filename/index.html b/files/zh-cn/web/javascript/reference/global_objects/error/filename/index.html
new file mode 100644
index 0000000000..430cb738c2
--- /dev/null
+++ b/files/zh-cn/web/javascript/reference/global_objects/error/filename/index.html
@@ -0,0 +1,85 @@
+---
+title: Error.prototype.fileName
+slug: Web/JavaScript/Reference/Global_Objects/Error/fileName
+translation_of: Web/JavaScript/Reference/Global_Objects/Error/fileName
+---
+<div>{{JSRef}} {{non-standard_header}}</div>
+
+<p><code><strong>fileName</strong></code> 属性包含引发此错误的文件的路径.</p>
+
+<h2 id="描述">描述</h2>
+
+<p>此非标准属性包含引发此错误的文件的路径. 如果从调试器上下文调用,例如Firefox Developer Tools,将会返回“debugger eval code”.</p>
+
+<h2 id="例子">例子</h2>
+
+<h3 id="使用_fileName">使用 <code>fileName</code></h3>
+
+<pre class="brush: js">var e = new Error('Could not parse input');
+throw e;
+// e.fileName could look like "file:///C:/example.html"
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<p>不属于任何规范的一部分. 非标准.</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<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>基本支持</td>
+ <td>{{CompatNo}}</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>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>基本支持</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="相关链接">相关链接</h2>
+
+<ul>
+ <li>{{jsxref("Error.prototype.stack")}} {{non-standard_inline}}</li>
+ <li>{{jsxref("Error.prototype.columnNumber")}} {{non-standard_inline}}</li>
+ <li>{{jsxref("Error.prototype.lineNumber")}} {{non-standard_inline}}</li>
+</ul>