在线文档教程
JavaScript
错误 | Errors

EvalError.prototype

EvalError.prototype

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

| EvalError.prototype的属性特性 |

|:----|

| Writable | no |

| Enumerable | no |

| Configurable | no |

描述

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

属性

EvalError.prototype.constructor指定创建实例原型的函数.

方法

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

规范

SpecificationStatusComment
ECMAScript 3rd Edition (ECMA-262)StandardInitial definition.
ECMAScript 5.1 (ECMA-262)The definition of 'NativeError.prototype' in that specification.StandardDefined as NativeError.prototype.
ECMAScript 2015 (6th Edition, ECMA-262)The definition of 'NativeError.prototype' in that specification.StandardDefined as NativeError.prototype.
ECMAScript Latest Draft (ECMA-262)The definition of 'NativeError.prototype' in that specification.Living StandardDefined as NativeError.prototype.

浏览器兼容性

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic Support(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)

FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)(Yes)