v148 · Performance · demo

Content Section Timer

Three sections are annotated with containertiming. A PerformanceObserver catches each entry as the browser finishes painting that section.

Origin trial feature: containertiming requires the Container Timing origin trial token in Chrome 148. This demo shows real API usage with a realistic simulation fallback.

Hero Section

[ hero image loading… ]

Article Body

Sidebar Widget

Container Timing entries
hero
waiting…
article
waiting…
sidebar
waiting…
Checking PerformanceObserver support…
// Mark sections in HTML:
// <section containertiming="hero">…</section>
// <article containertiming="article">…</article>

// Observe in JavaScript:
const observer = new PerformanceObserver(list => {
  for (const entry of list.getEntries()) {
    console.log(
      entry.identifier,   // "hero", "article", "sidebar"
      entry.renderTime,   // latest paint timestamp
      entry.firstRenderTime,
      entry.size          // { width, height } of container
    );
  }
});

observer.observe({ type: 'container', buffered: true });

references

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗