In my boilerplate Safari Web Extension code, I have a var "baseURLString".
By means of messaging, I am able to pass that var to my background.js as follows:
browser.runtime.sendNativeMessage("application.id", {message: "getBaseUrlString"}, function(response) {
console.log("Received sendNativeMessage response:");
baseURL = response["baseURLString"]
});
That works fine. But I need the value of that var also in my content.js.
What is the best approach?
It is likely quite simple, but I'm all confused between the legacy Safari Extensions, App Extensions, Web extensions, chrome api, safari api, etc
Thanks for your insight