localStorage not working across extension

6 views
Skip to first unread message

Garrett Lewis

unread,
Aug 26, 2015, 4:38:33 PM8/26/15
to Chromium Apps
I'm using the simple localStorage variable to save and load settings across my extension. The issue I'm facing is settings in the content script don't appear to be accessible in the background page (and vice versa).

How can I get this to work across all four scripts (background, content, options, and popup)? It appears only some of them are connected whereas others are isolated. I want all of them to share a variable and not have to pass messages back and forth constantly to achieve this. I was under the impression that localSotrage was a global variable for extensions that save settings, but apparently this isn't true.

If I need to use the storage api, how would I switch from using localStorage to it?
Reply all
Reply to author
Forward
0 new messages