diff options
| author | julieng <julien.gattelier@gmail.com> | 2021-10-02 17:20:14 +0200 |
|---|---|---|
| committer | SphinxKnight <SphinxKnight@users.noreply.github.com> | 2021-10-02 17:30:20 +0200 |
| commit | c05efa8d7ae464235cf83d7c0956e42dc6974103 (patch) | |
| tree | 6ea911b2f2010f63a026de6bb7a1a51e7690a7e1 /files/fr/web/api/performanceelementtiming/loadtime/index.html | |
| parent | 13a5e017558b248ee1647d4a5825f183b51f09ad (diff) | |
| download | translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.gz translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.tar.bz2 translated-content-c05efa8d7ae464235cf83d7c0956e42dc6974103.zip | |
move *.html to *.md
Diffstat (limited to 'files/fr/web/api/performanceelementtiming/loadtime/index.html')
| -rw-r--r-- | files/fr/web/api/performanceelementtiming/loadtime/index.html | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/files/fr/web/api/performanceelementtiming/loadtime/index.html b/files/fr/web/api/performanceelementtiming/loadtime/index.html deleted file mode 100644 index 28e33d6384..0000000000 --- a/files/fr/web/api/performanceelementtiming/loadtime/index.html +++ /dev/null @@ -1,64 +0,0 @@ ---- -title: PerformanceElementTiming.loadTime -slug: Web/API/PerformanceElementTiming/loadTime -tags: - - API - - Property - - Propriété - - Reference - - loadTime - - PerformanceElementTiming -translation_of: Web/API/PerformanceElementTiming/loadTime ---- -<div>{{APIRef("Element Timing API")}}</div> - -<p>La propriété en lecture seule <strong><code>loadTime</code></strong> de l'interface <a href="/fr/docs/Web/API/PerformanceElementTiming"><code>PerformanceElementTiming</code></a> renvoie toujours 0 pour le texte. Pour les images, elle renvoie le temps qui est le plus tardif entre le moment où la ressource image est chargée et le moment où elle est attachée à l'élément.</p> - -<h2 id="Syntax">Syntaxe</h2> - -<pre class="brush:js">var <var>loadTime</var> = <var>PerformanceElementTiming</var>.loadTime;</pre> - -<h3>Valeur</h3> -<p>Un objet <a href="/fr/docs/Web/API/DOMHighResTimeStamp"><code>DOMHighResTimeStamp</code></a> avec le temps de chargement de l'élément.</p> - -<h2 id="Examples">Exemples</h2> - -<p>Dans cet exemple, l'appel à <code>entry.loadTime</code> renvoie le temps de chargement de l'image.</p> - -<pre class="brush:html"><img src="image.jpg" alt="une belle image" elementtiming="big-image" id="myImage"></pre> - -<pre class="brush:js">const <var>observer</var> = new PerformanceObserver((list) => { - let <var>entries</var> = list.getEntries().forEach(function (entry) { - if (entry.identifier === "big-image") { - console.log(entry.loadTime); - } - }); -}); -observer.observe({ entryTypes: ["element"] });</pre> - -<div class="note"> - <p><strong>Note :</strong> Cet exemple utilise l'interface <a href="/fr/docs/Web/API/PerformanceObserver"><code>PerformanceObserver</code></a> pour créer une liste d'événements de mesure des performances. Dans notre cas, nous observons l'élément <a href="/fr/docs/Web/API/PerformanceEntry/entryType"><code>PerformanceEntry.entryType</code></a> afin d'utiliser l'interface <code>PerformanceElementTiming</code>.</p> -</div> - -<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('Element Timing API','#dom-performanceelementtiming-loadtime','PerformanceElementTiming.loadTime')}}</td> - <td>{{Spec2('Element Timing API')}}</td> - <td>Définition initiale.</td> - </tr> - </tbody> -</table> - -<h2 id="Browser_compatibility">Compatibilité des navigateurs</h2> - -<p>{{Compat("api.PerformanceElementTiming.loadTime")}}</p> |
