From c05efa8d7ae464235cf83d7c0956e42dc6974103 Mon Sep 17 00:00:00 2001 From: julieng Date: Sat, 2 Oct 2021 17:20:14 +0200 Subject: move *.html to *.md --- .../performance/clearresourcetimings/index.html | 84 ---------------------- .../api/performance/clearresourcetimings/index.md | 84 ++++++++++++++++++++++ 2 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 files/fr/web/api/performance/clearresourcetimings/index.html create mode 100644 files/fr/web/api/performance/clearresourcetimings/index.md (limited to 'files/fr/web/api/performance/clearresourcetimings') diff --git a/files/fr/web/api/performance/clearresourcetimings/index.html b/files/fr/web/api/performance/clearresourcetimings/index.html deleted file mode 100644 index b7a87a662a..0000000000 --- a/files/fr/web/api/performance/clearresourcetimings/index.html +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: performance.clearResourceTimings() -slug: Web/API/Performance/clearResourceTimings -tags: -- API -- Method -- Méthode -- Reference -- Performance web -translation_of: Web/API/Performance/clearResourceTimings ---- -
{{APIRef("Resource Timing API")}}
- -

La méthode clearResourceTimings() supprime toutes les {{domxref("PerformanceEntry", "entrées de performance","",1)}} avec un {{domxref("PerformanceEntry.entryType","entryType")}} de « resource » du tampon d'entrée de performance et fixe la taille du tampon de données de performance à zéro. Pour définir la taille du tampon de données de performance du navigateur, utilisez la méthode {{domxref("Performance.setResourceTimingBufferSize()")}}.

- -

{{AvailableInWorkers}}

- -

Syntaxe

- -
performance.clearResourceTimings();
-
- -

Arguments

- -

Aucun.

- -

Valeur de retour

- -

Aucune.

- -

Exemple

- -
function load_resource() {
-  var image = new Image();
-  image.src = "https://developer.mozilla.org/static/img/opengraph-logo.png";
-}
-function clear_performance_timings() {
-  if (performance === undefined) {
-    log("Le navigateur ne prend pas en charge les performances Web");
-    return;
-  }
-  // Crée une entrée de performance de synchronisation des ressources en chargeant une image
-  load_resource();
-
-  var supported = typeof performance.clearResourceTimings == "function";
-  if (supported) {
-    console.log("Exécuter : performance.clearResourceTimings()");
-    performance.clearResourceTimings();
-  } else {
-    console.log("performance.clearResourceTimings() N'EST PAS supporté");
-    return;
-  }
-  // getEntries devrait maintenant retourner zéro
-  var p = performance.getEntriesByType("resource");
-  if (p.length == 0)
-    console.log("... Le tampon de données de performance a été effacé");
-  else
-    console.log("... Le tampon de données de performance n'a PAS été effacé !");
-}
-
- -

Spécifications

- - - - - - - - - - - - - - - - -
SpécificationStatutCommentaire
{{SpecName('Resource Timing', '#dom-performance-clearresourcetimings', - 'clearResourceTimings()')}}{{Spec2('Resource Timing')}}Définition initiale.
- -

Compatibilité des navigateurs

- -

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

diff --git a/files/fr/web/api/performance/clearresourcetimings/index.md b/files/fr/web/api/performance/clearresourcetimings/index.md new file mode 100644 index 0000000000..b7a87a662a --- /dev/null +++ b/files/fr/web/api/performance/clearresourcetimings/index.md @@ -0,0 +1,84 @@ +--- +title: performance.clearResourceTimings() +slug: Web/API/Performance/clearResourceTimings +tags: +- API +- Method +- Méthode +- Reference +- Performance web +translation_of: Web/API/Performance/clearResourceTimings +--- +
{{APIRef("Resource Timing API")}}
+ +

La méthode clearResourceTimings() supprime toutes les {{domxref("PerformanceEntry", "entrées de performance","",1)}} avec un {{domxref("PerformanceEntry.entryType","entryType")}} de « resource » du tampon d'entrée de performance et fixe la taille du tampon de données de performance à zéro. Pour définir la taille du tampon de données de performance du navigateur, utilisez la méthode {{domxref("Performance.setResourceTimingBufferSize()")}}.

+ +

{{AvailableInWorkers}}

+ +

Syntaxe

+ +
performance.clearResourceTimings();
+
+ +

Arguments

+ +

Aucun.

+ +

Valeur de retour

+ +

Aucune.

+ +

Exemple

+ +
function load_resource() {
+  var image = new Image();
+  image.src = "https://developer.mozilla.org/static/img/opengraph-logo.png";
+}
+function clear_performance_timings() {
+  if (performance === undefined) {
+    log("Le navigateur ne prend pas en charge les performances Web");
+    return;
+  }
+  // Crée une entrée de performance de synchronisation des ressources en chargeant une image
+  load_resource();
+
+  var supported = typeof performance.clearResourceTimings == "function";
+  if (supported) {
+    console.log("Exécuter : performance.clearResourceTimings()");
+    performance.clearResourceTimings();
+  } else {
+    console.log("performance.clearResourceTimings() N'EST PAS supporté");
+    return;
+  }
+  // getEntries devrait maintenant retourner zéro
+  var p = performance.getEntriesByType("resource");
+  if (p.length == 0)
+    console.log("... Le tampon de données de performance a été effacé");
+  else
+    console.log("... Le tampon de données de performance n'a PAS été effacé !");
+}
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationStatutCommentaire
{{SpecName('Resource Timing', '#dom-performance-clearresourcetimings', + 'clearResourceTimings()')}}{{Spec2('Resource Timing')}}Définition initiale.
+ +

Compatibilité des navigateurs

+ +

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

-- cgit v1.2.3-54-g00ecf