javascript

Get and set storage in chrome extension

chrome.storage.sync.set({name: value}, function() {
    console.log('value is : ' + value);
});

chrome.storage.sync.get(['name'], function(result) {
    console.log('name is : ' + result.name);
});
Was this helpful?