Extension & Emerging Attributes
elementtiming
Labels eligible text or image content for Element Timing measurements. A PerformanceObserver can read supported element entries and correlate them using the identifier. Not all elements qualify; cross-origin image timing may be restricted and support is limited.
Formal Syntax & Structure
html syntaxhtml
elementtiming="hero"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| elementtiming | string | Identifier used to correlate timing records. |
Working Example
Example Snippethtml
<p elementtiming="headline">Featured article</p><output id="result"></output><script> const out=document.getElementById("result");if(window.PerformanceObserver && PerformanceObserver.supportedEntryTypes.includes("element")){new PerformanceObserver(list=>{for(const e of list.getEntries())out.textContent=e.identifier;}).observe({type:"element",buffered:true});}else{out.textContent="Element Timing unavailable";}</script>