← Chrome 148 reference

v148 · origin trial · performance api

Container Timing

Limited availability

  • Chrome · origin trial 148–153; 145+ behind a flag
  • Edge · mirrors Chrome’s flag
  • Firefox · 156+ behind a pref
  • Safari · not supported

Not Baseline. webstatus.dev lists the web-features entry container-timing (“Container timing performance entries”) as limited, with no browser recorded as shipping it by default (API record, queried 2026-11-15). Per-browser versions come from BCD api/PerformanceContainerTiming.json. See the full table.

A performance API that lets you measure when a named section of the DOM — a card, a widget, a news feed — first renders and when its last sub-element paints. Extends Element Timing from single elements to whole component trees.

Origin trial Container Timing is in origin trial from Chrome 148. You need an origin trial token to use it in production outside of local testing. API shape is still subject to change; verify against the WICG spec before shipping. To test locally, enable chrome://flags/#enable-experimental-web-platform-features (the flag recorded by ChromeStatus and BCD) or launch Chrome with --enable-blink-features=ContainerTiming (the ContainerTiming entry in runtime_enabled_features.json5, which also allows third-party origin-trial tokens). For real users, register for the trial at developer.chrome.com/origintrials.

at a glance

why it exists

The Element Timing API lets you observe when a single <img> or text block renders. But modern pages are built from components — a news card, a product widget, a comment thread — and what developers actually care about is when the whole component is ready, not just its headline image. Container Timing extends the same elementtiming / PerformanceObserver pattern to entire subtrees: mark a container with the containertiming attribute, and the browser reports the render timing of the container as a whole, tracking its constituent elements until all have painted.

Source: WICG Container Timing explainer; Chrome for Developers blog, May 2026.

shape of the API

Add the containertiming attribute to any element you want to measure. The attribute value becomes the identifier in the resulting PerformanceContainerTiming performance entry:

<section containertiming="product-card">
  <img src="product.jpg" alt="...">
  <h2>Product Name</h2>
  <p>Description...</p>
  <button>Add to cart</button>
</section>

Formal syntax (Web IDL)

Verbatim from the Container Timing specification IDL index (Draft Community Group Report, 1 October 2026; the old wicg.github.io address now redirects there), plus the PaintTimingMixin it includes from Paint Timing §3.1:

[Exposed=Window]
interface PerformanceContainerTiming : PerformanceEntry {
    readonly attribute DOMString identifier;
    readonly attribute DOMRectReadOnly intersectionRect;
    readonly attribute unsigned long long size;
    readonly attribute DOMHighResTimeStamp firstRenderTime;
    readonly attribute HTMLElement? lastPaintedElement;
    readonly attribute HTMLElement? rootElement;

    [Default] object toJSON();
};

PerformanceContainerTiming includes PaintTimingMixin;

partial interface HTMLElement {
    [CEReactions, Reflect] attribute DOMString containerTiming;
    [CEReactions, Reflect] attribute boolean containerTimingIgnore;
};

[Exposed=Window]
interface mixin PaintTimingMixin {
    readonly attribute DOMHighResTimeStamp paintTime;
    readonly attribute DOMHighResTimeStamp? presentationTime;
};

Chromium’s performance_container_timing.idl (main, read 2026-11-15) declares the same members behind RuntimeEnabled=ContainerTiming, with two type differences: size is a double and lastPaintedElement is an Element?. The two reflected attributes are declared in Chromium’s html_element.idl as Reflect=containertiming and Reflect=containertimingignore.

PerformanceEntry properties

PropertyDescription
entryType"container"
name / durationInherited from PerformanceEntry; always the empty string and 0 for container entries.
identifierThe value of the containertiming attribute.
startTimeThe paint time of the most recent frame that added new area to the container’s painted region. Each new entry for the same container reports a later value.
firstRenderTimeThe paint time of the container’s first recorded paint (a DOMHighResTimeStamp).
sizeThe total area, in square CSS pixels, of the container’s painted region: every newly painted rectangle unioned since the container was registered. Compare size between entries to filter out small changes.
intersectionRectA DOMRectReadOnly: the bounding rectangle of the painted region, in viewport CSS pixels. Rectangles are not adjusted if the container later moves.
lastPaintedElementThe element that contributed the largest newly painted area in this frame, or null. The spec describes it as a debugging aid, not a metric.
rootElementThe container root (the element carrying containertiming), or null.
paintTimeFrom PaintTimingMixin: the rendering-update end time of the entry’s paint timing info.
presentationTimeFrom PaintTimingMixin: the implementation-defined presentation time, or null when the browser does not expose one.
toJSON()Runs the default toJSON steps: returns a plain object with the entry’s attributes, suitable for JSON.stringify() and analytics beacons. Takes no arguments.

HTML attributes

<div containertiming="feed">
  <main>...</main>
  <!-- Updates here never create "feed" entries -->
  <aside containertimingignore>...</aside>
</div>

When entries are emitted

Errors: no member throws. An unsupported browser ignores the attributes, and observe({ type: 'container' }) registers nothing (Chrome logs a console warning for an unknown entry type), so feature-detect with PerformanceObserver.supportedEntryTypes.includes('container').

Source: WICG Container Timing specification §PerformanceContainerTiming; WICG explainer, May 2026. Re-checked 2026-11-15 against the current spec: §5 interface, §6.3 HTMLElement extensions, §6.8 handling paints, §6.9 emitting entries, §6.14 entry fields.

example

Observe container render metrics using a buffered PerformanceObserver:

const observer = new PerformanceObserver((entryList) => {
  for (const entry of entryList.getEntries()) {
    console.log(`Container "${entry.identifier}" rendered`);
    console.log('  First paint:', entry.firstRenderTime, 'ms');
    console.log('  Last paint:', entry.startTime, 'ms');
    console.log('  Painted area:', entry.size, 'px²');
    // entry is a PerformanceContainerTiming; entry.entryType is "container"
    console.log('  Entry type:', entry.entryType);
    console.log('  Last painted element:', entry.lastPaintedElement);
  }
});

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

Measuring multiple components

<!-- Mark each component you want to time -->
<div containertiming="hero-banner"> ... </div>
<ul containertiming="product-grid"> ... </ul>
<aside containertiming="sidebar-recs"> ... </aside>
// The observer receives separate entries for each identifier
const observer = new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    sendMetric(`render_${entry.identifier}`, entry.startTime);
  }
});
observer.observe({ type: 'container', buffered: true });

Origin trial setup

<meta http-equiv="origin-trial" content="YOUR_TOKEN_HERE">

Live example

The Chrome Platform Showcase Container Timing page collects five interactive demos. The embed below is its Content Section Timer. It needs a Chrome build with the API enabled (see the warning above) to report real entries.

Live example from the Chrome Platform Showcase (route checked 200, 2026-11-15): open the content section timer in a new tab. Other demos: timing dashboard, LCP vs Container Timing, content visibility meter, and paint budget monitor.Source: chrome-platform-showcase
Source: Chrome for Developers blog — Container Timing origin trial; blink-dev Intent to Experiment; Intent to Prototype, May 2026.

browser support

Per-version data from BCD api/PerformanceContainerTiming.json and the containerTiming / containerTimingIgnore entries in BCD api/HTMLElement.json (fetched 2026-11-15). Every interface member (identifier, intersectionRect, size, firstRenderTime, lastPaintedElement, rootElement, paintTime, presentationTime, toJSON()) has the same data as the interface.

BrowserPerformanceContainerTimingcontainerTiming / containerTimingIgnoreNotes
Chrome145 (behind a flag)145 (behind a flag)BCD: preference #enable-experimental-web-platform-features; status experimental. Interim, from ChromeStatus (not in BCD): origin trial on desktop and Android, Chrome 148–153.
EdgeMirrors ChromeMirrors ChromeBCD "edge": "mirror" (same flag). Chrome origin-trial tokens are not recorded for Edge.
Firefox156 (behind a pref)156 (behind a pref)BCD: dom.enable_container_timing set to true. Position: Positive (mozilla/standards-positions #1155).
SafariNot supportedNot supportedBCD version_added: false. Position: Neutral (WebKit/standards-positions #442).

BCD has no entry for the containertiming / containertimingignore HTML attributes themselves, only for their reflected IDL properties, and it does not record the Chrome origin trial. webstatus.dev rates the feature Baseline limited (queried 2026-11-15).

Source: BCD api/PerformanceContainerTiming.json; BCD api/HTMLElement.json; webstatus.dev API record; chromestatus.com feature page; BCD PerformanceEntry (the parent interface, unchanged).

security and privacy

The spec’s §7 Security and Privacy Considerations says the API exposes nothing new beyond what Element Timing and Paint Timing already allow a page to estimate:

Treat identifier values as public: they are written into the page’s own markup and are visible to any script running on the page, including third-party analytics.

Source: Container Timing spec §7; §6.11 contributes to container timing.

see also