--- title: SyntaxError.prototype slug: conflicting/Web/JavaScript/Reference/Global_Objects/SyntaxError tags: - Error - JavaScript - Propriété - Prototype - Reference - SyntaxError translation_of: Web/JavaScript/Reference/Global_Objects/SyntaxError translation_of_original: Web/JavaScript/Reference/Global_Objects/SyntaxError/prototype original_slug: Web/JavaScript/Reference/Objets_globaux/SyntaxError/prototype ---
La propriété SyntaxError.prototype
représente le prototype du constructeur {{jsxref("SyntaxError")}}.
Toutes les instances de {{jsxref("SyntaxError")}} héritent de SyntaxError.prototype
. Le prototype peut être utilisé afin d'ajouter des propriétés ou des méthodes à toutes les instances.
SyntaxError.prototype.constructor
message
en propre, dans SpiderMonkey, elle est héritée depuis {{jsxref("Error.prototype.message")}}.Bien que le prototype de {{jsxref("SyntaxError")}} ne possède pas de méthodes directes, les instances de {{jsxref("SyntaxError")}} héritent de certaines méthodes via la chaîne de prototypes.
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éfinie comme NativeError.prototype . |
{{SpecName('ES6', '#sec-nativeerror.prototype', 'NativeError.prototype')}} | {{Spec2('ES6')}} | Définie comme NativeError.prototype . |
{{SpecName('ESDraft', '#sec-nativeerror.prototype', 'NativeError.prototype')}} | {{Spec2('ESDraft')}} | Définie comme NativeError.prototype . |
{{Compat("javascript.builtins.SyntaxError")}}