Element.elementTiming is an instance property that reflects the elementtiming HTML attribute. Learn how that string labels an element for the Element Timing API, how to read and set it, and how to feature-detect—with five examples and try-it labs.
01
Kind
Instance property
02
Access
Get / set (reflects)
03
Type
String
04
Reflects
elementtiming
05
Used by
PerformanceElementTiming
06
Status
Experimental
Fundamentals
Introduction
The Element Timing API helps you measure when important elements (hero images, key text blocks, and similar) become visible and painted. To opt an element in, you give it an identifier with the elementtiming attribute.
elementTiming is the JavaScript reflection of that attribute: the same string you wrote in HTML, available on the Element object.
JavaScript
const el = document.getElementById("myImage");
console.log(el.elementTiming); // "big-image"
💡
Beginner tip
Think of elementTiming as a label for performance tooling—not a timestamp by itself. The timing numbers come from PerformanceElementTiming entries later.
Concept
Understanding the Property
MDN: the elementTiming property of the Element interface identifies elements for observation in the PerformanceElementTiming API. The property reflects the value of the elementtiming attribute.
Reflects HTML — same value as the elementtiming attribute.
String identifier — choose a clear name like hero-image.
Opt-in — only marked elements are observed for element timing.
const el = document.getElementById("myImage");
console.log(el.elementTiming); // "big-image"
Related learning: PerformanceElementTiming, PerformanceObserver, and customElementRegistry.
Cheat Sheet
⚡ Quick Reference
Goal
Code / note
Read identifier
el.elementTiming
Set in JS
el.elementTiming = "hero"
Set in HTML
elementtiming="hero"
Feature-detect
"elementTiming" in Element.prototype
MDN status
Experimental · Limited availability
Snapshot
🔍 At a Glance
Four facts about Element.elementTiming.
Kind
get / set
Instance
Type
string
Identifier
Reflects
elementtiming
HTML attr
Status
experimental
Not Baseline
Hands-On
Examples Gallery
Examples follow MDN Element: elementTiming. Labs focus on reading and setting the identifier; collecting entries needs PerformanceObserver where supported.
📚 Getting Started
Read and set the Element Timing identifier string.
Example 1 — Read elementTiming
MDN shape: an image marked with elementtiming="big-image".
JavaScript
const el = document.getElementById("myImage");
console.log(el.elementTiming); // "big-image"
Firefox and Safari typically report unsupported today. Keep analytics optional.
Example 5 — Support Snapshot
Feature-detect and remember the rules.
JavaScript
console.log({
supported: "elementTiming" in Element.prototype,
reflects: "elementtiming HTML attribute",
tip: "Label only — timings come from PerformanceElementTiming",
status: "Experimental · Limited availability (MDN)"
});
Element.elementTiming is Experimental and not Baseline. It belongs to the Element Timing / PerformanceElementTiming API. Always feature-detect. Logos use the shared browser-image-sprite.png sprite from this project.
✓ Experimental · Not Baseline
Element.elementTiming
String — reflects elementtiming; labels elements for PerformanceElementTiming.
LimitedExperimental
Google Chrome77+
Yes
Microsoft Edge79+
Yes
Opera64+ (Chromium)
Yes
Mozilla FirefoxNot supported — feature-detect
No
Apple SafariNot supported — feature-detect
No
Internet ExplorerNot supported
No
elementTimingLimited
Bottom line: Use elementTiming to opt elements into Element Timing. Collect metrics with PerformanceObserver where supported. Never require Element Timing for core UX — Chromium-first today.
Wrap Up
Conclusion
elementTiming is a simple string label that opts an element into the Element Timing API. Reflect the elementtiming attribute, feature-detect carefully, and collect real timings through PerformanceElementTiming where the browser supports it.
String label reflecting elementtiming—opts into Element Timing.
5
Core concepts
📄01
Get / set
on Element
Kind
📝02
String
identifier
Type
🔍03
Perf labels
hero & media
Use
✅04
Experimental
not Baseline
Status
🎯05
Detect first
Chromium-first
Tip
❓ Frequently Asked Questions
It identifies an element for observation by the PerformanceElementTiming API. The property reflects the elementtiming HTML attribute as a string.
MDN marks Element.elementTiming as Experimental and Limited availability (not Baseline). It is not Deprecated or Non-standard. Always feature-detect before production use.
Add the elementtiming attribute in HTML (for example elementtiming="big-image") or set el.elementTiming = "big-image" in JavaScript where supported.
A string — the identifier you chose for that element. Empty string when the attribute is missing.
Primarily Chromium-based browsers (Chrome 77+, Edge 79+, Opera). Firefox and Safari generally do not support Element Timing yet.
Observe PerformanceEntry records of type "element" with PerformanceObserver, or read PerformanceElementTiming entries. See MDN PerformanceElementTiming for the full flow.
Did you know?
elementTiming is only the identifier. The actual paint/load timestamps live on PerformanceElementTiming entries—observe type "element" with a PerformanceObserver in supporting browsers.