Call Storage API with callback?
Chrome has an option to provide a callback when using .set(), wondering if the same is possible with Plasmo's Storage API?
chrome.storage.sync.set({ products: aoProduct }, function () {
console.log(
"Added product ",
oProduct,
"to Chrome storage. New products: ",
aoProduct
)
resolve()
})
chrome.storage.sync.set({ products: aoProduct }, function () {
console.log(
"Added product ",
oProduct,
"to Chrome storage. New products: ",
aoProduct
)
resolve()
})