Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. Element
  4. elementTiming

Element: elementTiming property

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.

TheelementTiming property of theElement interface identifies elements for observation in thePerformanceElementTiming API. TheelementTiming property reflects the value of theelementtiming attribute.

Value

A string.

Examples

Logging the value ofelementTiming

In this example, adding theelementtiming attribute to the<img> element sets the image to be observed.

html
<img  src="image.jpg"  alt="a nice image"  elementtiming="big-image"  />

You can get the string value of theelementtiming HTML attribute by callingel.elementTiming.

js
const el = document.getElementById("myImage");console.log(el.elementTiming); // "big-image"

For a more complete example on how to use the Element Timing API, seePerformanceElementTiming.

Specifications

Specification
Element Timing API
# dom-element-elementtiming

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp