Attribut HTML : elementtiming

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

L'attribut elementtiming est utilisé pour indiquer qu'un élément est marqué pour le suivi par l'API Element Timing. Cet attribut peut être appliqué aux éléments <img>, <image> à l'intérieur d'un <svg>, aux vignettes des éléments <video>, aux éléments qui ont un background-image et aux éléments contenant des noeuds de texte, comme un paragraphe (<p>).

Utilisation

La valeur donnée pour elementtiming devient un identifiant pour l'élément observé.

html
<img alt="alt" src="img.jpg" elementtiming="étiquette pour l'élément" />

De bons candidats pour les éléments que vous pourriez vouloir observer sont :

  • L'image principale d'un article.
  • Le titre d'un article de blog.
  • Les images dans un carrousel pour un site d'achat.
  • L'image de l'affiche de la vidéo principale d'une page.

Exemples

html
<img alt="Alt pour l'image principale d'un article de blog"
     src="my-massive-image.jpg"
     elementtiming="Image principale">

<p elementtiming="important-text">Quelques informations importantes.</p">

Spécifications

No specification found

No specification data found for undefined.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Compatibilité des navigateurs

Voir aussi