Chrome Storage

Promises

From webextension-polyfill

await browser.storage.sync.set({iframeType: "onboard"});
let storage = await browser.storage.sync.get(['iframeType', 'questions', 'lastQuestionDate']);
const { iframeType } = storage;

To check out limits: Go to background script, type chrome.storage.sync. then let browser autocomplete

Chrome

Local

their chrome local

chrome.storage.local.set({key: value}, function() {
  console.log('Value is set to ' + value);
});

chrome.storage.local.get(['key'], function(result) {
  console.log('Value currently is ' + result.key);
});

Global

Syncs to google id, their sync must be enabled if not is equivalent to local storage saves

Other

Detect Changes

Last updated