Function getFID

  • Gets the first input delay (FID) of a web page using the Performance API. The FID is the time it takes for the first user input to be processed by the browser.


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


    FID: 123

    Returns Promise<number>

    A promise that resolves with the FID in milliseconds, or 0 if the 'first-input' entry type is not supported.