@inchill/time-to-interactive
Version:
Easily measure performance metrics of time to interactive in JavaScript.
13 lines (12 loc) • 492 B
TypeScript
/**
* Override the open and send methods of XMLHttpRequest to track XHR requests
* @param beforeRequestCb function
* @param onRequestCompletedCb function
*/
export declare const patchXMLHTTPRequest: (beforeRequestCb: any, onRequestCompletedCb: any) => void;
/**
* Override the Fetch function to track Fetch requests
* @param beforeRequestCb function
* @param onRequestCompletedCb function
*/
export declare const patchFetch: (beforeRequestCb: any, onRequestCompletedCb: any) => void;