db.syncable.getStatus()

Get sync status for given URL

Syntax

db.syncable.getStatus(url, callback)

Parameters

url: string
The URL to get the status for

callback: Function

function (number) { }

optional

Callback Parameters

Return Value

Promise<number>

Remarks

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.

See also

Dexie.Syncable.js

Dexie.Syncable.Statuses

Dexie.Syncable.StatusTexts

db.syncable.list()