BackgroundFetchRegistration: recordsAvailable property
MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونهکد
{{APIRef("Background Fetch API")}}{{SeeCompatTable}}{{AvailableInWorkers}}
The **recordsAvailable** read-only property of the {{domxref("BackgroundFetchRegistration")}} interface returns true if there are requests and responses to be accessed. If this returns false, then {{domxref("BackgroundFetchRegistration.match()","match()")}} and {{domxref("BackgroundFetchRegistration.matchAll()","matchAll()")}} can't be used.
Value
A {{jsxref("Boolean")}}.
Examples
Logging this property to the console returns true or false to indicate if there are records.
js
console.log(bgFetch.recordsAvailable);Specifications
{{Specifications}}
Browser compatibility
{{Compat}}