extension-api-compilation
Version:
Cross browser extension api
36 lines (33 loc) • 1.03 kB
JavaScript
export default class SyncStorage {
/**
* Set data to sync storage
* @param data {Object} An object which gives each key/value pair to update storage with
* @returns {Promise} Promise will be called with created data or failure
*/
set(data) {
throw new Error("Not implemented exception");
}
/**
* Get data from sync storage
* @param key {string|Array} A single key or list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage.
* @returns {Promise} The promise will associated data on success or error otherwise
*/
get(key) {
throw new Error("Not implemented exception");
}
/**
* Clear all data associated with current extension from sync storage
*/
clear() {
throw new Error("Not implemented exception");
}
static detectBrowser() {
if (chrome)
return 'chrome';
else if (browser) {
return 'mozilla'
}
else
return undefined;
}
}