I am just starting to look at the V3 manifest requirements and had the following questions.
I currently have in my background.js
var settings = new usersettings();usersettings fetches all the settings from chrome.storage.local once and then if a setting property is changed then saves it back to storage.Do I understand it correctly that with V3 each time I need a value from settings I need to use for example chrome.storage? Further is/will the only way to retrieve storage be the following;
chrome.storage.local.get(['key'], function(result) { console.log('Value currently is ' + result.key); });I am not a professional software engineer but using the above code each time I need to read a boolean setting seems very inefficient and is going to not only slow down the extension but also create a lot more code. I read that V3 will take advantage of promises is this something that can be used with chrome.storage.local.get?
I use a native messaging host. I call chrome.runtime.connectNative when the background starts up and hold the port open meaning that the Native Host which Google Chrome starts also runs. I cannot find anything on how native messaging is supposed to work with service workers. Is chrome.runtime.connectNative even useful anymore with service workers? Will the native host start and stop with the service worker? If it does how can any native code send messages to the Extension?
Is the following strategy a good idea? Is a Manifest V2 with background "persistent": false the same as a service worker? In other words instead of doing a major change to V3 could I first get my code running in V2 with a non-persistent background.js?
My native host passes some javascript to my extension which in turn adds it via the script tag. I read that in V3 that javascript cannot be retrieved by an external source. Has anyone seen anything from Google on whether the native host will be treated as an external source? On the one hand I of course can see that by definition native host code is external, however, a native host has (at least for a windows PC) much higher installation standards and user rights requirements than an extension that gets code from some external url. This is the reason for my question.
Anyone got a crystal ball on when a V2 update will be rejected?