Open abalter opened 2 years ago
@abalter The chrome.storage.sync is undefined
error can be solved by adding
sync: {
set: function(...params) {
browser.storage.local.set(...params);
},
get: function(...params) {
return browser.storage.local.get(...params);
},
},
after Line 87 in your WebExtensionShim.js file. Note: The code only works on these browsers without transpilation. If you need more browsers to be supported use a transpiler like Babel.js. I made an example JSFiddle here.
This is sort of a feature request, but moreso, a shameless request for help with MY project.
I'm trying to port a chrome app to be a web app. I found this shim and it's doing a lot of the work. There are still some chrome API methods that need to be covered. I'm not a javascript or web programmer, but I'm kind of trying to build a proof-of-concept thing.
In particular, this is the list of chrome methods used in my app vs. ones already in the shim.
Chrome Methods Needed for My App
Right now (in this branch) the error I get is
https://github.com/abalter/codepad-webapp/blob/chrome-storage-sync-problem/src/js/handlers/ide.settings.js#L70