-
-
Notifications
You must be signed in to change notification settings - Fork 641
db.syncable.getStatus()
Nikolas Poniros edited this page Jan 28, 2017
·
6 revisions
Get sync status for given URL
db.syncable.getStatus(url, callback)
url: string | The URL to get the status for | |
callback: Function | function (number) { } | optional |
status: number | The status of the given URL |
If the callback is omitted the returned Promise will resolve with the sync status for given URL, calling any Promise.then() callback.
If the callback is specified, it will be called with the sync status for the given URL and the returned Promise will resolve with the return value of given callback.
Independent on whether you use a Promise to get the sync status or a callback, if the database is not open, the returned status will be the status OFFLINE (0).
For a list of statuses, see Dexie.Syncable.Statuses. To map a status number to a string, use Dexie.Syncable.StatusTexts.
Dexie.js - minimalistic and bullet proof indexedDB library