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
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.