EvalError.prototype

翻译不完整。 请帮助我们翻译这篇文章!

EvalError.prototype 属性是 EvalError 原型构造函数.

EvalError.prototype 属性的属性特性:
writable false
enumerable false
configurable false

Description

EvalError 全部实例都继承自EvalError.prototype. 你可以通过prototype去添加方法和属性.

Properties

EvalError.prototype.constructor
指定创建实例原型的函数.
EvalError.prototype.message
错误信息. 从 ECMA-262 开始 EvalError 提供 message (继承自Error.prototype.message)属性, 详见 SpiderMonkey.
EvalError.prototype.name
错误名称.继承自 Error.
EvalError.prototype.fileName
引发错误的文件路径. 继承自 Error.
EvalError.prototype.lineNumber
引发错误所在行.继承自 Error.
EvalError.prototype.columnNumber
引发错误所在的列. 继承自Error.
EvalError.prototype.stack
堆栈.继承自 Error.

Methods

虽然 EvalError 自己的属性方法较少, 但是通过原型链继承了很多有用的方法.

Specifications

Specification Status Comment
ECMAScript 3rd Edition (ECMA-262) Standard 初代.
ECMAScript 5.1 (ECMA-262)
NativeError.prototype
Standard 定义为NativeError.prototype.
ECMAScript 2015 (6th Edition, ECMA-262)
NativeError.prototype
Standard 定义为NativeError.prototype.
ECMAScript (ECMA-262)
NativeError.prototype
Living Standard 定义为NativeError.prototype.

Browser compatibility

Update compatibility data on GitHub
DesktopMobileServer
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung InternetNode.js
EvalErrorChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 5.5Opera Full support 5Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0nodejs Full support 0.1.100
EvalError() constructorChrome Full support 1Edge Full support 12Firefox Full support 1IE Full support 5.5Opera Full support 5Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0nodejs Full support 0.1.100

Legend

Full support  
Full support

See also