在线文档教程
JavaScript
错误 | Errors

ReferenceError.prototype

ReferenceError.prototype

ReferenceError.prototype属性表示ReferenceError构造函数的原型。

| ReferenceError.prototype的属性特性 |

|:----|

| Writable | no |

| Enumerable | no |

| Configurable | no |

描述

所有ReferenceError实例都继承自ReferenceError.prototype。您可以使用原型向所有实例添加属性或方法。

属性

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

方法

尽管ReferenceError原型对象本身不包含任何方法,但ReferenceError实例通过原型链继承了一些方法。

规范

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)