BackgroundFetchRegistration: id property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("Background Fetch API")}}{{SeeCompatTable}}{{AvailableInWorkers}}

The **id** read-only property of the {{domxref("BackgroundFetchRegistration")}} interface returns a copy of the background fetch's ID.

Value

A string.

Examples

Logging the this part to the console returns the identifier set when registering the fetch. In this case, "my-fetch".

js
console.log(bgFetch.id); // "my-fetch"

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}