InteractionContentfulPaint: presentationTime property
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 presentationTime read-only property of the InteractionContentfulPaint interface returns the timestamp of when the painted pixels were actually drawn on the screen.
The presentationTime is optional — some browsers may always return 0 or not expose the value at all. The value is also implementation-dependent — it may differ across browsers that choose to expose it.
Value
A DOMHighResTimeStamp or null if the value is not exposed.
Examples
This example uses a PerformanceObserver to log new interaction-contentful-paint performance entries as they are recorded in the browser's performance timeline. The buffered option is used to access entries from before the observer creation.
const observer = new PerformanceObserver((list) => {
for (const entry of list.getEntries()) {
console.log(
"Interaction Contentful Paint:",
entry.startTime,
entry.paintTime,
);
}
});
observer.observe({ type: "interaction-contentful-paint", buffered: true });
Specifications
| Specification |
|---|
| Paint Timing> # dom-painttimingmixin-presentationtime> |