aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/performanceentry/name
diff options
context:
space:
mode:
authorjulieng <julien.gattelier@gmail.com>2021-10-02 17:20:24 +0200
committerSphinxKnight <SphinxKnight@users.noreply.github.com>2021-10-02 17:30:20 +0200
commit1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde (patch)
tree30a56efd3eff3a01bd1611e1840fdbbfacf544a4 /files/fr/web/api/performanceentry/name
parentc05efa8d7ae464235cf83d7c0956e42dc6974103 (diff)
downloadtranslated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.gz
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.tar.bz2
translated-content-1407c8fdef01ecd0ffb8a8bd46e7113f119b9fde.zip
convert content to md
Diffstat (limited to 'files/fr/web/api/performanceentry/name')
-rw-r--r--files/fr/web/api/performanceentry/name/index.md145
1 files changed, 47 insertions, 98 deletions
diff --git a/files/fr/web/api/performanceentry/name/index.md b/files/fr/web/api/performanceentry/name/index.md
index 6e8c05fe4e..9bc2ee9e97 100644
--- a/files/fr/web/api/performanceentry/name/index.md
+++ b/files/fr/web/api/performanceentry/name/index.md
@@ -11,70 +11,36 @@ tags:
- Performance Web
translation_of: Web/API/PerformanceEntry/name
---
-<div>{{APIRef("Performance Timeline API")}}</div>
-
-<p>La propriété <strong><code>name</code></strong> de l'interface <a href="/fr/docs/Web/API/PerformanceEntry"><code>PerformanceEntry</code></a> renvoie une valeur qui précise davantage la valeur renvoyée par la propriété <a href="/fr/docs/Web/API/PerformanceEntry/entryType"><code>PerformanceEntry.entryType</code></a>. Cette propriété est en lecture seule.</p>
-
-<p>{{AvailableInWorkers}}</p>
-
-<h2 id="Syntax">Syntaxe</h2>
-
-<pre class="brush: js">var <var>name</var> = <var>entry</var>.name;
-</pre>
-
-<h3 id="Return_Value">Valeur de retour</h3>
-
-<p>La valeur de retour dépend du sous-type de l'objet <code>PerformanceEntry</code> et de la valeur de <a href="/fr/docs/Web/API/PerformanceEntry/entryType"><code>PerformanceEntry.entryType</code></a>, comme le montre le tableau ci-dessous.</p>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Type de valeur pour <code>name</code></th>
- <th scope="col">Sous-type</th>
- <th scope="col">Type (<code>entryType</code>)</th>
- <th scope="col">Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><a href="/fr/docs/Web/API/URL"><code>URL</code></a></td>
- <td><a href="/fr/docs/Web/API/PerformanceFrameTiming"><code>PerformanceFrameTiming</code></a>,
- <a href="/fr/docs/Web/API/PerformanceNavigationTiming"><code>PerformanceNavigationTiming</code></a></td>
- <td><code>frame</code>, <code>navigation</code></td>
- <td>L'adresse du document.</td>
- </tr>
- <tr>
- <td><a href="/fr/docs/Web/API/URL"><code>URL</code></a></td>
- <td><a href="/fr/docs/Web/API/PerformanceResourceTiming"><code>PerformanceResourceTiming</code></a></td>
- <td><code>resource</code></td>
- <td>L'URL résolue de la ressource demandée. Cette valeur ne change pas même si la demande est redirigée.</td>
- </tr>
- <tr>
- <td><a href="/fr/docs/Web/API/DOMString"><code>DOMString</code></a></td>
- <td><a href="/fr/docs/Web/API/PerformanceMark"><code>PerformanceMark</code></a></td>
- <td><code>mark</code></td>
- <td>Le nom utilisé lorsque le marqueur a été créé en appelant <a href="/fr/docs/Web/API/Performance/mark"><code>mark()</code></a>.</td>
- </tr>
- <tr>
- <td><a href="/fr/docs/Web/API/DOMString"><code>DOMString</code></a></td>
- <td><a href="/fr/docs/Web/API/PerformanceMeasure"><code>PerformanceMeasure</code></a></td>
- <td><code>measure</code></td>
- <td>Le nom utilisé lorsque la mesure a été créée en appelant <a href="/fr/docs/Web/API/Performance/measure"><code>measure()</code></a>.</td>
- </tr>
- <tr>
- <td><a href="/fr/docs/Web/API/DOMString"><code>DOMString</code></a></td>
- <td><a href="/fr/docs/Web/API/PerformancePaintTiming"><code>PerformancePaintTiming</code></a></td>
- <td><code>paint</code></td>
- <td>Soit <code>'first-paint'</code> ou <code>'first-contentful-paint'</code>.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="Example">Exemple</h2>
-
-<p>L'exemple suivant montre l'utilisation de la propriété <code>name</code>.</p>
-
-<pre class="brush: js">function run_PerformanceEntry() {
+{{APIRef("Performance Timeline API")}}
+
+La propriété **`name`** de l'interface [`PerformanceEntry`](/fr/docs/Web/API/PerformanceEntry) renvoie une valeur qui précise davantage la valeur renvoyée par la propriété [`PerformanceEntry.entryType`](/fr/docs/Web/API/PerformanceEntry/entryType). Cette propriété est en lecture seule.
+
+{{AvailableInWorkers}}
+
+## Syntaxe
+
+```js
+var name = entry.name;
+```
+
+### Valeur de retour
+
+La valeur de retour dépend du sous-type de l'objet `PerformanceEntry` et de la valeur de [`PerformanceEntry.entryType`](/fr/docs/Web/API/PerformanceEntry/entryType), comme le montre le tableau ci-dessous.
+
+| Type de valeur pour `name` | Sous-type | Type (`entryType`) | Description |
+| ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------- |
+| [`URL`](/fr/docs/Web/API/URL) | [`PerformanceFrameTiming`](/fr/docs/Web/API/PerformanceFrameTiming), [`PerformanceNavigationTiming`](/fr/docs/Web/API/PerformanceNavigationTiming) | `frame`, `navigation` | L'adresse du document. |
+| [`URL`](/fr/docs/Web/API/URL) | [`PerformanceResourceTiming`](/fr/docs/Web/API/PerformanceResourceTiming) | `resource` | L'URL résolue de la ressource demandée. Cette valeur ne change pas même si la demande est redirigée. |
+| [`DOMString`](/fr/docs/Web/API/DOMString) | [`PerformanceMark`](/fr/docs/Web/API/PerformanceMark) | `mark` | Le nom utilisé lorsque le marqueur a été créé en appelant [`mark()`](/fr/docs/Web/API/Performance/mark). |
+| [`DOMString`](/fr/docs/Web/API/DOMString) | [`PerformanceMeasure`](/fr/docs/Web/API/PerformanceMeasure) | `measure` | Le nom utilisé lorsque la mesure a été créée en appelant [`measure()`](/fr/docs/Web/API/Performance/measure). |
+| [`DOMString`](/fr/docs/Web/API/DOMString) | [`PerformancePaintTiming`](/fr/docs/Web/API/PerformancePaintTiming) | `paint` | Soit `'first-paint'` ou `'first-contentful-paint'`. |
+
+## Exemple
+
+L'exemple suivant montre l'utilisation de la propriété `name`.
+
+```js
+function run_PerformanceEntry() {
console.log("Support de PerformanceEntry ...");
if (performance.mark === undefined) {
@@ -89,7 +55,7 @@ translation_of: Web/API/PerformanceEntry/name
// Utilise getEntries() pour itérer à travers chaque entrée.
let p = performance.getEntries();
- for (let i = 0; i &lt; p.length; i++) {
+ for (let i = 0; i < p.length; i++) {
console.log("Entry[" + i + "]");
check_PerformanceEntry(p[i]);
}
@@ -98,7 +64,7 @@ function check_PerformanceEntry(obj) {
let properties = ["name", "entryType", "startTime", "duration"];
let methods = ["toJSON"];
- for (let i = 0; i &lt; properties.length; i++) {
+ for (let i = 0; i < properties.length; i++) {
// Vérifie chaque propriété
let supported = properties[i] in obj;
if (supported)
@@ -106,7 +72,7 @@ function check_PerformanceEntry(obj) {
else
console.log("..." + properties[i] + " = Not supported");
}
- for (let i = 0; i &lt; methods.length; i++) {
+ for (let i = 0; i < methods.length; i++) {
// Vérifie chaque méthode
let supported = typeof obj[methods[i]] == "function";
if (supported) {
@@ -117,34 +83,17 @@ function check_PerformanceEntry(obj) {
}
}
}
-</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-performanceentry-name',
- 'name')}}</td>
- <td>{{Spec2('Performance Timeline Level 2')}}</td>
- <td></td>
- </tr>
- <tr>
- <td>{{SpecName('Performance Timeline', '#dom-performanceentry-name',
- 'name')}}</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.PerformanceEntry.name")}}</p>
+```
+
+## Spécifications
+
+| Spécification | Statut | Commentaire |
+| ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------- | -------------------- |
+| {{SpecName('Performance Timeline Level 2', '#dom-performanceentry-name',
+ 'name')}} | {{Spec2('Performance Timeline Level 2')}} | |
+| {{SpecName('Performance Timeline', '#dom-performanceentry-name',
+ 'name')}} | {{Spec2('Performance Timeline')}} | Définition initiale. |
+
+## Compatibilité des navigateurs
+
+{{Compat("api.PerformanceEntry.name")}}