0

We are converting an extension from Chrome to Edge and the local storage is not behaving as expected.

In the extension we have an options page defined in the manifest as so:

"options_ui": {
    "page": "options.html"
},

After converting to Edge using the "Microsoft Edge Extension Toolkit" the extension loads in Edge and we are able to view the options page and save the data. Looking at the debugger -> Local Storage we can see the options object saved.

In Chrome we are able to access this object from the background script and popup page however on Edge when I view the Local Storage on the Debugger for either the background or popup there is no object for the options in local storage. We are able to write to local storage from both but each one is entirely separate and we don't seem able to share data this way.

Is this intended on Edge and is there an alternative to make the options page data available to background and popup?

user351711
  • 3,171
  • 5
  • 39
  • 74
  • 1
    Sounds like a 100% bug, which is not surprising, really. Both Edge and Firefox still have lots of them in their implementation of WebExtensions API. You might have to switch to chrome.storage.local instead. – wOxxOm Sep 14 '18 at 19:52

1 Answers1

0

I was having this same problem when I was creating a new extension. I was making live changes to the javascript file and refreshing the page and noticed the same thing: 1. Options page -> save to localstorage 2. Popup -> retrieve from localstorage -> null 3. Options Page -> Checked Storage in the debugger -> value was there 4. Popup -> Checked Storage in debugger -> no values

So I tried reloading the extension in edge (More -> Extensions -> your_extension -> reload extension)

After that I repeated the steps above and I was able to retrieve the values in localstorage from my popup that had been saved to localstorage from my options page.

Avery Lane
  • 33
  • 3