OK, so, if I have an object
activeMenus: (or an array of objects, as is the case with the custom menus)
The way that I have am currently saving it, retreiving it, and listening using the window.localStorage API is:
window.addEventListener("storage", generateMenu, false);
This has the disadvantages of being wiped if the user clears data, and also it requires variables to be stringified and parsed on storage and retrieval.
Using the browser.storage.local API, this would look like:
window.addEventListener(“storage”, generateMenu, false);
browser.addEventListener(“storage”, generateMenu, false);
And then the data would not be purged when the user clears their personal data, and as a bonus, I would not have to stringify and parse.
Am I correct in my reading of this?