--- title: EvalError.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/EvalError tags: - Error - EvalError - JavaScript - Propriété - Reference translation_of: Web/JavaScript/Reference/Global_Objects/EvalError translation_of_original: Web/JavaScript/Reference/Global_Objects/EvalError/prototype original_slug: Web/JavaScript/Reference/Objets_globaux/EvalError/prototype ---
{{JSRef}}

La propriété EvalError.prototype représente le prototype du constructeur {{jsxref("EvalError")}}.

{{js_property_attributes(0,0,0)}}

Description

Chacune des instances de {{jsxref("EvalError")}} hérite de {{jsxref("EvalError.prototype")}}. On peut utiliser le prototype pour ajouter des propriétés ou des méthodes à toutes les instances.

Propriétés

EvalError.prototype.constructor
Définit la fonction qui crée une instance basée sur le prototype.
{{jsxref("Error.prototype.message", "EvalError.prototype.message")}}
Un message décrivant l'erreur. Bien que la spécification ECMA-262 définit que EvalError doit fournir une propriété message propre à l'objet, l'implémentation de SpiderMonkey fait qu'il hérite de {{jsxref("Error.prototype.message")}}.
{{jsxref("Error.prototype.name", "EvalError.prototype.name")}}
Un nom d'erreur. Propriété héritée de {{jsxref("Error")}}.
{{jsxref("Error.prototype.fileName", "EvalError.prototype.fileName")}}
Un chemin vers le fichier qui a provoqué l'erreur. Propriété héritée de {{jsxref("Error")}}.
{{jsxref("Error.prototype.lineNumber", "EvalError.prototype.lineNumber")}}
Le numéro de la ligne du fichier qui a provoqué l'erreur. Propriété héritée de {{jsxref("Error")}}.
{{jsxref("Error.prototype.columnNumber", "EvalError.prototype.columnNumber")}}
Le numéro de la colonne dans la ligne du fichier qui a provoqué l'erreur. Propriété héritée de {{jsxref("Error")}}.
{{jsxref("Error.prototype.stack", "EvalError.prototype.stack")}}
Pile d'appels. Propriété héritée de {{jsxref("Error")}}.

Méthodes

Bien que l'objet prototype EvalError ne possède pas de propriété propre, les instances de {{jsxref("EvalError")}} héritent de certaines méthodes via la chaîne de prototypes.

Spécifications

Spécification Statut Commentaires
{{SpecName('ES3')}} {{Spec2('ES3')}} Définition initiale.
{{SpecName('ES5.1', '#sec-15.11.7.6', 'NativeError.prototype')}} {{Spec2('ES5.1')}} Défini comme NativeError.prototype.
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}} {{Spec2('ES6')}} Défini comme NativeError.prototype.
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}} {{Spec2('ESDraft')}} Défini comme NativeError.prototype.

Compatibilité des navigateurs

{{Compat("javascript.builtins.EvalError")}}

Voir aussi