Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

TypeError.prototype

TypeError.prototype プロパティは、TypeError コンストラクタのプロトタイプを表します。

説明

全ての TypeError インスタンスは TypeError.prototypeを継承します。全てのインスタンスに対してプロパティ又はメソッドを追加するために、このプロトタイプを利用できます。

プロパティ

TypeError.prototype.constructor
インスタンスのプロトタイプを生成した関数を示します。
TypeError.prototype.message
エラーメッセージ。ECMA-262 は TypeError 自体が message プロパティを提供するべきであると規定してるにもかかわらず、SpiderMonkey では Error.prototype.message を継承します。
TypeError.prototype.name
エラー名。Error から継承します。
TypeError.prototype.fileName
エラーが発生したファイルのパス。Error から継承します。
TypeError.prototype.lineNumber
エラーが発生したファイル内の行番号。Error から継承します。
TypeError.prototype.columnNumber
エラーが発生した行内のカラム番号。Error から継承します。
TypeError.prototype.stack
スタックトレース。Error から継承します。

メソッド

TypeError プロトタイプオブジェクトが自分自身のいかなるメソッドも持っていなくても、TypeError インスタンスはプロトタイプチェーンを通していくつかのメソッドを継承しています。

仕様

仕様書 策定状況 コメント
ECMAScript 3rd Edition (ECMA-262)
NativeError.prototype の定義
標準 最初期の定義
ECMAScript 5.1 (ECMA-262)
NativeError.prototype の定義
標準 NativeError.prototype として定義。
ECMAScript 2015 (6th Edition, ECMA-262)
NativeError.prototype の定義
標準 NativeError.prototype として定義。
ECMAScript 2017 Draft (ECMA-262)
NativeError.prototype の定義
ドラフト  

ブラウザ実装状況

機能 Chrome Firefox (Gecko) Internet Explorer Opera Safari
基本サポート (有) (有) (有) (有) (有)
機能 Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
基本サポート (有) (有) (有) (有) (有) (有)

参照

ドキュメントのタグと貢献者

 このページの貢献者: yyss, teoli, ethertank, Potappo, Hfjapancom
 最終更新者: yyss,