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.
Usage:
getFID().then( res => { console.log(`FID: ${res}`); }); Copy
getFID().then( res => { console.log(`FID: ${res}`); });
Output:
FID: 123 Copy
FID: 123
A promise that resolves with the FID in milliseconds, or 0 if the 'first-input' entry type is not supported.
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.
Usage:
Output: