BackgroundFetchRegistration: recordsAvailable property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Note: This feature is available in Web Workers.
Thuộc tính chỉ đọc recordsAvailable của giao diện BackgroundFetchRegistration trả về true nếu có các yêu cầu và phản hồi để truy cập. Nếu giá trị này trả về false thì không thể dùng match() và matchAll().
Giá trị
Một boolean.
Ví dụ
Ghi thuộc tính này ra console sẽ trả về true hoặc false để cho biết có bản ghi hay không.
js
console.log(bgFetch.recordsAvailable);
Thông số kỹ thuật
| Specification |
|---|
| Background Fetch> # dom-backgroundfetchregistration-recordsavailable> |