Function getFP

  • 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.


    res => {
    console.log(`FP: ${res}`);


    FP: 123

    Returns Promise<number>

    A promise that resolves with the FP time in milliseconds, or 0 if the 'paint' entry type is not supported.