Performance API
The paintTime read-only property of the PerformanceSoftNavigation interface returns the DOMHighResTimeStamp of when the rendering phase ended and the paint phase started.
The paintTime is broadly interoperable: The value should be the same across different implementations.
Value
A DOMHighResTimeStamp.
Examples
This example uses a PerformanceObserver to log new soft-navigation 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("Soft Nav:", entry.startTime, entry.paintTime);
}
});
observer.observe({ type: "soft-navigation", buffered: true });
Specifications
Browser compatibility
See also
- LargestContentfulPaint.presentationTime
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
