You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use this library in a browser extension that I plan on developing for multiple browsers - in particular Chrome and Firefox. As the extension consists of both a popup menu, background page and content scripts it gets a little complicated trying to access the same localstorage data from all parts of the extension.
In the README store.area(name, customStorageObject) is mentioned as a way of "plugging in" a different storage provider/source as far as I understand. I tried getting it to work with Chromes storage API, but it seems the required API from this library is fairly different from Chrome's. With Chrome's own storage API it should be much easier to access the same data without intercommunication between scripts, which is what I'm looking for.
So my question is: is it at all possible to use this library with a browser's native storage API without having to write a custom wrapper to make it fit into store.area?
The text was updated successfully, but these errors were encountered:
Xerillio
changed the title
Question:
Question: Are browser native storage APIs supported?
Nov 28, 2021
If the API for the browser's native storage conforms to this interface: https://developer.mozilla.org/en-US/docs/Web/API/Storage
then it should work fine. If it doesn't, then you'll need to write a wrapper to adapt the interface.
I've really never worked in extension-land, so that's all i could tell you. Is this the API you want to adapt store2's interface for? https://developer.chrome.com/docs/extensions/reference/storage/
Because it appears that's an async API. I'm not sure how you'd adapt that for the synchronous API store2 provides.
I'm trying to use this library in a browser extension that I plan on developing for multiple browsers - in particular Chrome and Firefox. As the extension consists of both a popup menu, background page and content scripts it gets a little complicated trying to access the same localstorage data from all parts of the extension.
In the README
store.area(name, customStorageObject)
is mentioned as a way of "plugging in" a different storage provider/source as far as I understand. I tried getting it to work with Chromes storage API, but it seems the required API from this library is fairly different from Chrome's. With Chrome's own storage API it should be much easier to access the same data without intercommunication between scripts, which is what I'm looking for.So my question is: is it at all possible to use this library with a browser's native storage API without having to write a custom wrapper to make it fit into
store.area
?The text was updated successfully, but these errors were encountered: