1

I want to get chrome storage. but outside of chrome.storage.local.get function It's not working.

My code is below

chrome.storage.local.get('Setting', function(data){
    var Setting = data.Setting;
});
console.log(Setting);
Feroz Ahmed
  • 931
  • 10
  • 16
  • Chrome API callbacks are asynchronous. See the link for solutions. In short, the value should be used inside the callback or passed via Promise (also async/await). – wOxxOm Mar 02 '18 at 20:08

0 Answers0