BackgroundFetchRegistration.result

The result read-only property of the BackgroundFetchRegistration interface returns a string indicating whether the background fetch was successful or failed.

Syntax

let theResult = BackgroundFetchRegistration.result;

Value

One of the following strings:

""

The fetch is active so there is no result.

"success"

The background fetch was successful.

"failure"

The background fetch failed. This only appears when there is no ability for the browser to retry.

Examples

Logging BackgroundFetchRegistration.result to the console returns a string indicating the status, or an empty string if the fetch is still active.

console.log(bgFetch.result);

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
result
74
79
No
No
62
No
No
74
No
53
No
11.0

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/BackgroundFetchRegistration/result