Gets the first paint (FP) time of a web page using the Performance API. The FP time is the time it takes for the first pixel to be painted on the screen.
Usage:
getFP().then( res => { console.log(`FP: ${res}`); }); Copy
getFP().then( res => { console.log(`FP: ${res}`); });
Output:
FP: 123 Copy
FP: 123
A promise that resolves with the FP time in milliseconds, or 0 if the 'paint' entry type is not supported.
Gets the first paint (FP) time of a web page using the Performance API. The FP time is the time it takes for the first pixel to be painted on the screen.
Usage:
Output: