PerformanceElementTiming

Limited availability

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

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The PerformanceElementTiming interface contains render timing information for image and text node elements the developer annotated with an elementtiming attribute for observation.

Description

The aim of the Element Timing API is to give web developers or analytics tools the ability to measure rendering timestamps of critical elements on a page.

The API supports timing information on the following elements:

  • <img> elements,
  • <image> elements inside an <svg>,
  • poster images of <video> elements,
  • elements which have a contentful background-image property with a URL value for a resource that is actually available, and
  • groups of text nodes, such as a <p>.

The author flags an element for observation by adding the elementtiming attribute on the element.

PerformanceElementTiming inherits from PerformanceEntry.

PerformanceEntry PerformanceElementTiming

Instance properties

This interface directly defines the following properties:

PerformanceElementTiming.element Read only

An Element representing the element we are returning information about.

PerformanceElementTiming.id Read only

A string which is the id of the element.

PerformanceElementTiming.identifier Read only

A string which is the value of the elementtiming attribute on the element.

PerformanceElementTiming.intersectionRect Read only

A DOMRectReadOnly which is the rectangle of the element within the viewport.

PerformanceElementTiming.loadTime Read only

A DOMHighResTimeStamp with the loadTime of the element.

PerformanceElementTiming.naturalHeight Read only

An unsigned 32-bit integer (unsigned long) which is the intrinsic height of the image if this is applied to an image, 0 for text.

PerformanceElementTiming.naturalWidth Read only

An unsigned 32-bit integer (unsigned long) which is the intrinsic width of the image if this is applied to an image, 0 for text.

PerformanceElementTiming.paintTime

Returns the timestamp when the rendering phase ended and the paint phase started.

PerformanceElementTiming.presentationTime

Returns the timestamp when the element was actually drawn on the screen.

PerformanceElementTiming.renderTime Read only

A DOMHighResTimeStamp with the renderTime of the element.

PerformanceElementTiming.url Read only

A string which is the initial URL of the resources request for images, 0 for text.

It also extends the following PerformanceEntry properties, qualifying and constraining them as described:

PerformanceEntry.duration Read only

Always returns 0 as duration does not apply to this interface.

PerformanceEntry.entryType Read only

Always returns "element".

PerformanceEntry.name Read only

Returns "image-paint" for images and "text-paint" for text.

PerformanceEntry.startTime Read only

Returns the value of this entry's renderTime if it is not 0, otherwise the value of this entry's loadTime.

Instance methods

PerformanceElementTiming.toJSON()

Returns a JSON representation of the PerformanceElementTiming object.

Examples

Observing render time of specific elements

In this example two elements are being observed by adding the elementtiming attribute. A PerformanceObserver is registered to get all performance entries of type "element" and the buffered flag is used to access data from before observer creation.

html
<img src="image.jpg" elementtiming="big-image" />
<p elementtiming="text" id="text-id">text here</p>
js
const observer = new PerformanceObserver((list) => {
  list.getEntries().forEach((entry) => {
    console.log(entry);
  });
});
observer.observe({ type: "element", buffered: true });

Two entries will be output to the console. The first containing details of the image, the second with details of the text node.

Observing separate paint and presentation timings

The paintTime and presentationTime properties enable you to retrieve specific timings for the paint phase starting and the element being drawn on the screen. The paintTime is broadly interoperable, whereas the presentationTime is implementation-dependent.

This example uses a PerformanceObserver to observe all performance entries of type "element" (remember that, to be observed, elements need to have elementtiming attributes set on them). We check for paintTime and presentationTime support and retrieve those values if they are available. In non-supporting browsers, the code retrieves the renderTime or loadTime, depending on what is supported.

js
const observer = new PerformanceObserver((list) => {
  const entries = list.getEntries();
  entries.forEach((entry) => {
    if (entry.presentationTime) {
      console.log(
        "Element paintTime:",
        entry.paintTime,
        "Element presentationTime:",
        entry.presentationTime,
      );
    } else if (entry.paintTime) {
      console.log("Element paintTime:", entry.paintTime);
    } else if (entry.renderTime) {
      console.log("Element renderTime:", entry.renderTime);
    } else {
      console.log("Element loadTime", entry.loadTime);
    }
  });
});
observer.observe({ type: "element", buffered: true });

Specifications

Specification
Element Timing API
# sec-performance-element-timing

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
PerformanceElementTiming
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
element
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
id
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
identifier
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
intersectionRect
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
loadTime
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
naturalHeight
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
naturalWidth
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
paintTime
Experimental
Chrome – Full support
Chrome 145 (Release date: 2026-02-10)
footnote Full support
Edge – Full support
Edge 145 (Release date: 2026-02-14)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 129 (Release date: 2026-03-18)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 145 (Release date: 2026-02-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 96 (Release date: 2026-03-10)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 145 (Release date: 2026-02-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
presentationTime
Experimental
Chrome – Full support
Chrome 145 (Release date: 2026-02-10)
footnote Full support
Edge – Full support
Edge 145 (Release date: 2026-02-14)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 129 (Release date: 2026-03-18)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 145 (Release date: 2026-02-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 96 (Release date: 2026-03-10)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – Full support
WebView Android 145 (Release date: 2026-02-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
renderTime
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Cross-origin
Experimental
Chrome – Full support
Chrome 133 (Release date: 2025-02-04)
footnote Full support
Edge – Full support
Edge 133 (Release date: 2025-02-06)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 118 (Release date: 2025-04-15)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 133 (Release date: 2025-02-04)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 88 (Release date: 2025-03-19)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 29 (Release date: 2025-10-25)
footnote Full support
WebView Android – Full support
WebView Android 133 (Release date: 2025-02-04)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
toJSON
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
url
Experimental
Chrome – Full support
Chrome 77 (Release date: 2019-09-10)
footnote Full support
Edge – Full support
Edge 79 (Release date: 2020-01-15)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 64 (Release date: 2019-10-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 77 (Release date: 2019-09-10)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 55 (Release date: 2019-12-03)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 12 (Release date: 2020-06-19)
footnote Full support
WebView Android – Full support
WebView Android 77 (Release date: 2019-09-10)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.

See also