How to access simple-storage from WebExtensions code?
Context: our extension (Ghostery) is posted in Mozilla store, and is SDK-based. Currently we’ve ported code to WebExtensions API. We plan to upgrade our users once Firefox 49 is out. The problem is the transfer of user settings during upgrade. In the SDK based app user settings are saved in simple-storage. We need a read-only access to it from a WebExtensions based code.
There are plans to let you “embed” a WebExtension within your extension and have them communicate. I hope it will land soon, but it is currently still under review: https://bugzilla.mozilla.org/show_bug.cgi?id=1252215
Thank you Nilkas. Concerning deployment it means that we have to release
SDK-based hotfix to our existing users before posting an WebExtension-
based version. We were trying to avoid that. Look like, however, it is the
only strategy available.
Just an afterthought. I think the upgrade problem Ghostery facing may be generic enough. Can it be possible to add an API on chrome, like getMySimpleStorage which gives read-only access to the running app’s legacy simple storage? Does not need to expose Component, classes or interfaces to WebExtension code, just a high-level API. It may be documented as a temporary solution and removed once the support for SDK-based apps is retired.