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 Latest Draft (ECMA-262) NativeError.prototype |
Draft | 定义为NativeError.prototype. |
Browser compatibility
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.
Update compatibility data on GitHub
| Desktop | Mobile | Server | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EvalError |
Chrome Full support 1 | Edge Full support 12 | Firefox Full support 1 | IE Full support 5.5 | Opera Full support Yes | Safari Full support Yes | WebView Android Full support 1 | Chrome Android Full support 18 | Firefox Android Full support 4 | Opera Android Full support Yes | Safari iOS Full support Yes | Samsung Internet Android Full support 1.0 | nodejs Full support Yes |
Legend
- Full support
- Full support