aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/performance/getentries
diff options
context:
space:
mode:
authortristantheb <tristantheb@users.noreply.github.com>2021-03-16 06:48:45 +0100
committerGitHub <noreply@github.com>2021-03-16 06:48:45 +0100
commit0830c11eef8ef87dda77d8274abb3c15297bc2b3 (patch)
tree02a5169fa3cff34994a9024330a4496bb7539e7a /files/fr/web/api/performance/getentries
parentd49032372e1ad262a313dc974d8de6bb6efbf784 (diff)
downloadtranslated-content-0830c11eef8ef87dda77d8274abb3c15297bc2b3.tar.gz
translated-content-0830c11eef8ef87dda77d8274abb3c15297bc2b3.tar.bz2
translated-content-0830c11eef8ef87dda77d8274abb3c15297bc2b3.zip
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 <SphinxKnight@users.noreply.github.com>
Diffstat (limited to 'files/fr/web/api/performance/getentries')
-rw-r--r--files/fr/web/api/performance/getentries/index.html104
1 files changed, 104 insertions, 0 deletions
diff --git a/files/fr/web/api/performance/getentries/index.html b/files/fr/web/api/performance/getentries/index.html
new file mode 100644
index 0000000000..2cebfda905
--- /dev/null
+++ b/files/fr/web/api/performance/getentries/index.html
@@ -0,0 +1,104 @@
+---
+title: performance.getEntries()
+slug: Web/API/Performance/getEntries
+tags:
+- API
+- Method
+- Méthode
+- Reference
+- Performance web
+translation_of: Web/API/Performance/getEntries
+---
+<div>{{APIRef("Performance Timeline API")}}</div>
+
+<p class="seoSummary">La méthode <strong><code>getEntries()</code></strong> renvoie une liste de tous les objets {{domxref("PerformanceEntry")}} pour la page. Les membres de la liste (<em>entrées</em>) peuvent être créés en faisant des <em>marqueurs</em> ou des <em>mesures</em> de performance (par exemple en appelant la méthode {{domxref("Performance.mark", "mark()")}}) à des moments explicites. Si vous souhaitez filtrer les entrées de performance en fonction de leur type ou de leur nom, consultez la documentation des méthodes {{domxref("Performance.getEntriesByType", "getEntriesByType()")}} et {{domxref("Performance.getEntriesByName", "getEntriesByName()")}}.</p>
+
+<p>{{AvailableInWorkers}}</p>
+
+<h2 id="Syntax">Syntaxe</h2>
+
+<pre class="brush: js">
+ <var>entries</var> = window.performance.getEntries();
+</pre>
+
+<h3 id="Return_Value">Valeur de retour</h3>
+
+<dl>
+ <dt><code>entries</code></dt>
+ <dd>Un tableau ({{jsxref("Array")}}) d'objets {{domxref("PerformanceEntry")}}. Les éléments seront classés par ordre chronologique en fonction des entrées {{domxref("PerformanceEntry.startTime","startTime")}}.</dd>
+</dl>
+
+<h2 id="Example">Exemple</h2>
+
+<pre class="brush: js">function use_PerformanceEntry_methods() {
+ console.log("PerformanceEntry tests ...");
+
+ if (performance.mark === undefined) {
+ console.log("... performance.mark Non pris en charge");
+ return;
+ }
+
+ // Crée quelques entrées de performance via la méthode mark()
+ performance.mark("Begin");
+ do_work(50000);
+ performance.mark("End");
+ performance.mark("Begin");
+ do_work(100000);
+ performance.mark("End");
+ do_work(200000);
+ performance.mark("End");
+
+ // Utilise getEntries() pour itérer à travers chaque entrée.
+ let p = performance.getEntries();
+ for (var i=0; i &lt; p.length; i++) {
+ console.log("Entry[" + i + "]");
+ check_PerformanceEntry(p[i]);
+ }
+
+ // Utilise getEntriesByType() pour obtenir toutes les entrées "mark".
+ p = performance.getEntriesByType("mark");
+ for (let i=0; i &lt; p.length; i++) {
+ console.log ("Mark only entry[" + i + "]: name = " + p[i].name +
+ "; startTime = " + p[i].startTime +
+ "; duration = " + p[i].duration);
+ }
+
+ // Utilise getEntriesByName() pour obtenir toutes les entrées "mark" nommées "Begin".
+ p = performance.getEntriesByName("Begin", "mark");
+ for (let i=0; i &lt; p.length; i++) {
+ console.log ("Mark and Begin entry[" + i + "]: name = " + p[i].name +
+ "; startTime = " + p[i].startTime +
+ "; duration = " + p[i].duration);
+ }
+}
+</pre>
+
+<h2 id="Specifications">Spécifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Spécification</th>
+ <th scope="col">Statut</th>
+ <th scope="col">Commentaire</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('Performance Timeline Level 2', '#dom-performance-getentries',
+ 'getEntries()')}}</td>
+ <td>{{Spec2('Performance Timeline Level 2')}}</td>
+ <td></td>
+ </tr>
+ <tr>
+ <td>{{SpecName('Performance Timeline', '#dom-performance-getentries',
+ 'getEntries()')}}</td>
+ <td>{{Spec2('Performance Timeline')}}</td>
+ <td>Définition initiale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2>
+
+<p>{{Compat("api.Performance.getEntries")}}</p>