According to the chrome.storage API, the correct way to store the value is .set :
chrome.storage.local.set({"mykey": someData}, optionalCompletionCallback);
And to access the value later, use .get with a callback that accepts the data:
chrome.storage.local.get("mykey", function(fetchedData) { alert("fetched: " + fetchedData.mykey); });
source share