From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- .../reference/global_objects/symbol/index.html | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 files/fr/conflicting/web/javascript/reference/global_objects/symbol/index.html (limited to 'files/fr/conflicting/web/javascript/reference/global_objects/symbol/index.html') diff --git a/files/fr/conflicting/web/javascript/reference/global_objects/symbol/index.html b/files/fr/conflicting/web/javascript/reference/global_objects/symbol/index.html new file mode 100644 index 0000000000..9f3c6f0703 --- /dev/null +++ b/files/fr/conflicting/web/javascript/reference/global_objects/symbol/index.html @@ -0,0 +1,75 @@ +--- +title: Symbol.prototype +slug: Web/JavaScript/Reference/Objets_globaux/Symbol/prototype +tags: + - ECMAScript6 + - JavaScript + - Propriété + - Reference + - Symbol +translation_of: Web/JavaScript/Reference/Global_Objects/Symbol +translation_of_original: Web/JavaScript/Reference/Global_Objects/Symbol/prototype +--- +
{{JSRef}}
+ +

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

+ +
{{EmbedInteractiveExample("pages/js/symbol-prototype.html")}}
+ + + +

Description

+ +

Les instances de {{jsxref("Symbol")}} héritent toutes de {{jsxref("Symbol.prototype")}}. Ce prototype du constructeur peut être utilisé afin d'ajouter des propriétés et/ou des méthodes pour chaque instance de Symbol via la chaîne de prototypes.

+ +

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

+ +

Propriétés

+ +
+
Symbol.prototype.constructor
+
Cette propriété correspond à la fonction qui a crée l'instance du prototype. Par défaut, c'est la fonction {{jsxref("Symbol")}} qui est renvoyée.
+
{{jsxref("Symbol.prototype.description")}}
+
Une chaîne de caractères en lecture seule qui contient la description du symbole.
+
+ +

Méthodes

+ +
+
{{jsxref("Symbol.prototype.toSource()")}} {{Non-standard_inline}}
+
Cette méthode renvoie une chaîne de caractères contenant la source de l'objet {{jsxref("Objets_globaux/Symbol", "Symbol")}}. Cette méthode surcharge la méthode {{jsxref("Object.prototype.toSource()")}}.
+
{{jsxref("Symbol.prototype.toString()")}}
+
Cette méthode renvoie une chaîne de caractères contenant la description du symbole. Cette méthode surcharge la méthode {{jsxref("Object.prototype.toString()")}}.
+
{{jsxref("Symbol.prototype.valueOf()")}}
+
Cette méthode renvoie la valeur primitive de l'objet {{jsxref("Symbol")}}. Cette méthode surcharge la méthode {{jsxref("Object.prototype.valueOf()")}}.
+
{{jsxref("Symbol.prototype.@@toPrimitive()", "Symbol.prototype[@@toPrimitive]")}}
+
Renvoie la valeur primitive de l'objet {{jsxref("Symbol")}}.
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES6', '#sec-symbol.prototype', 'Symbol.prototype')}}{{Spec2('ES6')}}Définition initiale.
{{SpecName('ESDraft', '#sec-symbol.prototype', 'Symbol.prototype')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ + + +

{{Compat("javascript.builtins.Symbol.prototype")}}

-- cgit v1.2.3-54-g00ecf