Answers for "chrome extension storage local"

2

chrome extension storage local

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

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

// 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);
});
Posted by: Guest on October-21-2021

Code answers related to "chrome extension storage local"

Code answers related to "Javascript"

Browse Popular Code Answers by Language