I'm developing a chrome extension and willing to know, if storage.sync
synced first before firing onInstalled
event. Am i supposed to do something like this:
browser.runtime.onInstalled.addListener(async () => {
const { profileId } = await browser.storage.sync.get(['profileId']);
// get user from API and save to storage.local
});
to get user synced between devices? Or should i do it in any other place?
If i got it right, there is no way to check it out before publishing my extension. Or maybe is there a way to sync chrome extensions installed locally?
Thanks.