From 0830c11eef8ef87dda77d8274abb3c15297bc2b3 Mon Sep 17 00:00:00 2001 From: tristantheb Date: Tue, 16 Mar 2021 06:48:45 +0100 Subject: Complete French translation of the Performance interface (#163) * UPDATE: Update the content of the Performance page * CREATE: Translate the performance.clearMarks() page * CREATE: Translate the performance.clearMeasures() page * CREATE: Translate the performance.clearResourceTiming() page * CREATE: Translate the performance.getEntries() page * FIX: Tags not updated during the translation phase * CREATE: Translate the performance.getEntriesByName() page * CREATE: Translate the performance.getEntriesByType() page * CREATE: Translate the performance.mark() page * CREATE: Translate the performance.measure() page * CREATE: Translate the performance.memory page * CREATE: Translate the performance.onresourcetimingbufferfull page * CREATE: Translate the performance.onresourcetimingbufferfull_event page * CREATE: Translate the performance.setResourceTimingBufferSize() page * CREATE: Translate the performance.timeOrigin page * CREATE: Translate the performance.timing page * CREATE: Translate the performance.toJSON() page * UPDATE: Update content of the performance.navigation page * UPDATE: Update content of the performance.now() page * FIX: Fix several typo and style issues * Minor typofixes for #163 (1/n) * Minor typofixes for #163 (2/n) * Minor typofixes for #163 (3/n) * Minor modifications for #163 (4/n) * Minor typofixes for #163 (5/n) * Minor typofixes for #163 (6/n) * Minor typofixes for #163 (7/n) * Minor typofixes for #163 (8/n) * Minor typofixes for #163 (9/n) * Minor changes for #163 (10/n) * Minor typofixes for #163 (10/n) * Minor typofixes for #163 (12/n) * Minor typofixes for #163 (13/n) * Minor typofixes for #163 (14/n) * Minor typofixes for #163 (15/n) * Minor typofixes for #163 (16/n) * Minor typofixes for #163 (n/n) Co-authored-by: SphinxKnight --- files/fr/web/api/performance/clearmarks/index.html | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 files/fr/web/api/performance/clearmarks/index.html (limited to 'files/fr/web/api/performance/clearmarks') diff --git a/files/fr/web/api/performance/clearmarks/index.html b/files/fr/web/api/performance/clearmarks/index.html new file mode 100644 index 0000000000..31634399f9 --- /dev/null +++ b/files/fr/web/api/performance/clearmarks/index.html @@ -0,0 +1,93 @@ +--- +title: performance.clearMarks() +slug: Web/API/Performance/clearMarks +tags: + - API + - Method + - Méthode + - Reference + - Performance web +translation_of: Web/API/Performance/clearMarks +--- +
{{APIRef("User Timing API")}}
+ +

La méthode clearMarks() supprime les marqueurs nommés du tampon d'entrée des performances du navigateur. Si la méthode est appelée sans arguments, toutes les {{domxref("PerformanceEntry", "entrées de performance","",1)}} avec un {{domxref("PerformanceEntry.entryType", "entryType")}} de « mark » seront supprimées du tampon d'entrée de performance.

+ +

{{AvailableInWorkers}}

+ +

Syntaxe

+ +
+  performance.clearMarks();
+  performance.clearMarks(name);
+
+ +

Arguments

+ +
+
name {{optional_inline}}
+
Un {{domxref("DOMString")}} représentant le nom de l'horodatage. Si cet argument est omis, toutes les {{domxref("PerformanceEntry","entrées de performance","",1)}} avec un {{domxref("PerformanceEntry.entryType","entryType")}} de « mark » seront supprimés.
+
+ +

Valeur de retour

+ +

Aucune.

+ +

Exemple

+ +

L'exemple suivant montre les deux utilisations de la méthode clearMarks().

+ +
// Créé une petite aide pour montrer combien d'entrées PerformanceMark il y a.
+function logMarkCount() {
+  console.log(
+    "J'ai trouvé autant d'entrées : " + performance.getEntriesByType("mark").length
+  );
+}
+
+// Crée une série de marqueurs.
+performance.mark("squirrel");
+performance.mark("squirrel");
+performance.mark("monkey");
+performance.mark("monkey");
+performance.mark("dog");
+performance.mark("dog");
+
+logMarkCount() // "J'ai trouvé autant d'entrées : 6"
+
+// Supprime seulement les entrées "squirrel" de PerformanceMark.
+performance.clearMarks('squirrel');
+logMarkCount() // "J'ai trouvé autant d'entrées : 4"
+
+// Supprime toutes les entrées de PerformanceMark.
+performance.clearMarks();
+logMarkCount() // "J'ai trouvé autant d'entrées : 0"
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('User Timing Level 2', '#dom-performance-clearmarks', + 'clearMarks()')}}{{Spec2('User Timing Level 2')}}Clarification de clearMarks().
{{SpecName('User Timing', '#dom-performance-clearmarks', 'clearMarks()')}}{{Spec2('User Timing')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ +

{{Compat("api.Performance.clearMarks")}}

-- cgit v1.2.3-54-g00ecf