Path: blob/main/files/en-us/web/api/backgroundfetchmanager/getids/index.md
6517 views
------{{APIRef("Background Fetch API")}}{{SeeCompatTable}}
The getIds() method of the {{domxref("BackgroundFetchManager")}} interface returns the IDs of all registered background fetches.
Syntax
Parameters
None.
Return value
A {{jsxref("Promise")}} that resolves with an {{jsxref('Array')}} of {{jsxref('String', 'strings')}}.
Exceptions
None.
Examples
The following examples shows how to retrieve the IDs of all registered background fetches. With an active service worker, use the {{domxref('ServiceWorkerRegistration.backgroundFetch')}} property to access the BackgroundFetchManager object and call its getIds() method.
Specifications
{{Specifications}}
Browser compatibility
{{Compat}}