diff --git a/apps/browser/src/autofill/utils/index.ts b/apps/browser/src/autofill/utils/index.ts index ab01f517e3e..e5d20cf9f59 100644 --- a/apps/browser/src/autofill/utils/index.ts +++ b/apps/browser/src/autofill/utils/index.ts @@ -1,6 +1,12 @@ import { AutofillPort } from "../enums/autofill-port.enums"; import { FillableFormFieldElement, FormFieldElement } from "../types"; +/** + * Polyfills the requestIdleCallback API with a setTimeout fallback. + * + * @param callback - The callback function to run when the browser is idle. + * @param options - The options to pass to the requestIdleCallback function. + */ export function requestIdleCallbackPolyfill(callback: () => void, options?: Record) { if ("requestIdleCallback" in globalThis) { return globalThis.requestIdleCallback(() => callback(), options);