A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Error/fileName below:

Error.prototype.fileName - JavaScript | MDN

Error.prototype.fileName

非标准: 该特性尚未标准化。我们不建议在生产环境中使用非标准特性,因为它们在浏览器中的支持有限,且可能发生变化或被移除。不过,在没有标准选项的特定情况下,它们可以作为合适的替代方案。

fileName 属性包含引发此错误的文件的路径。

描述

此非标准属性包含引发此错误的文件的路径。如果从调试器上下文调用,例如 Firefox Developer Tools,将会返回“debugger eval code”.

示例 使用 fileName
var e = new Error("Could not parse input");
throw e;
// e.fileName could look like "file:///C:/example.html"
规范 浏览器兼容性 参见

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4