Global variable/storage across all the add-on's scripts

(Lipocodes) #1

Hi folks,

I’ve been using localStorage[“name”] as a storage solution.

The issue is that I need to store a value in my popup script and retrieve it in my content script.

What would be the best solution?

Thanks for your great help,

(Martin Giger) #2

You can just access storage from your content script, no matter what storage system you use. If you want to coordinate retrieving the value, you can use messaging via runtime.sendMessage.