I am new to Chrome extension developing. As far as I know, the chrome.storage.local.set can only set an object as a whole. The only way I can find of assigning an object to storage.local is as below:
chrome.storage.local.set({ key : value }, function() {
console.log("Object set.");
});
When I use "get" method to retrieve the saved data I get this one only. And every time when I set a new object to storage.local, it updates the previously stored data. However, I wanna write a function that allows me to add a new object to the storage object, like:
{
{subObject1: value},
{subObject2: value},
{subObject3: value},
...
}
How can I do that? Huge thanks in advance!
Aucun commentaire:
Enregistrer un commentaire