Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
* Some parts of this feature may have varying levels of support.
ReferenceError オブジェクトは、現在のスコープに存在しない(あるいはまだ初期化されていない)変数が参照されたときのエラーを表します。
ReferenceError はシリアライズ可能オブジェクトなので、 structuredClone() で複製したり、ワーカー間で postMessage() を使用してコピーしたりすることができます。
ReferenceError は Error のサブクラスです。
新しい ReferenceError オブジェクトを生成します。
親である Error から継承したプロパティもあります。
これらのプロパティは ReferenceError.prototype で定義されており、すべての ReferenceError インスタンスで共有されます。
ReferenceError.prototype.constructorこのインスタンスオブジェクトを作成したコンストラクター関数。 ReferenceError インスタンスの場合、初期値は ReferenceError コンストラクタです。
ReferenceError.prototype.nameエラー型の名前を表します。 ReferenceError.prototype.name の初期値は "ReferenceError" です。
親である Error から継承したメソッドもあります。
| ECMAScript® 2027 Language Specification # sec-native-error-types-used-in-this-standard-referenceerror |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2024年4月20日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.