Back to Content

BackgroundFetchRegistration: downloaded property

files/en-us/web/api/backgroundfetchregistration/downloaded/index.md

latest692 B
Original Source

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

The downloaded read-only property of the {{domxref("BackgroundFetchRegistration")}} interface returns the size in bytes that has been downloaded, initially 0.

If the value of this property changes, the progress event is fired at the associated {{domxref("BackgroundFetchRegistration")}} object.

Value

A {{jsxref("number")}}.

Examples

Logging this property to the console returns the number of bytes downloaded.

js
console.log(bgFetch.downloaded);

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}