URIError.prototype 属性表示
URIError 构造器的原型。
描述
所有的 URIError 实例都继承自 URIError.prototype。 可以通过原型(prototype) 给所有的实例添加属性或者方法。
属性
-
URIError.prototype.constructor - 声明创建实例原型 (prototype) 的方法。
-
URIError.prototype.message -
错误信息。虽然 ECMA-262 规范指出
URIError应该提供其自己专属的message属性,但是在 SpiderMonkey 中,该属性继承自Error.prototype.message -
URIError.prototype.name -
错误名称。继承自
Error。 -
URIError.prototype.fileName -
产生该错误的代码所在文件的路径。 继承自
Error。 -
URIError.prototype.lineNumber -
产生该错误的代码所在行的行号。继承自
Error。 -
URIError.prototype.columnNumber -
产生该错误的代码所在列的列号。 继承自
Error。 -
URIError.prototype.stack -
堆栈记录。继承自
Error。
方法
虽然 URIError 的实例通过原型链(prototype chain)继承了一些方法。
规范
| Specification | Status | Comment |
|---|---|---|
| ECMAScript 3rd Edition (ECMA-262) NativeError.prototype |
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. |
浏览器兼容性
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 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
URIError |
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