Hello John,
The point is that the app views and the WebExtensions content and background scripts works in different leagues: you already know that we can communicate both leagues, but, we can't share certain stuff like you wanted here in this post. I think we have at least three possible solutions or workarounds that we can do:
1º Duplicate the "Config.js" file, named one "AppConfig.js" and other "WebExtConfig.js", and use the app's Files Manager to properly add these scripts for the app and for the WebExtension.
2º Copy the contents of the "Config.js" file and place it in a script which are used by the app and by the WebExtension: maybe you can directly copy the contents of the "Config.js" file in the app's Mounted event and some of the WebExtension event... or just leave a file for the WebExtension.
3º Use a web served "Config.js" file, which you can add by his URL using the app's Files Manager, maybe with some different "query", since in other case, that is, using the same URL, probably we can't use it for both the app's views and the WebExtension.
In any case we are not sharing the file, due to the fact that I refer in the first paragraph of this post: we are talking about different contexts that cannot share stuff in this manner. So I think you can chooose one of the above possible approachs. Why I will do? Since apparently what the "Config.js" file establish certain Javascript object to be extended, I think that duplicate the "Config.js" can be enough, in order to provided that base object in both the app's views and the WebExtension contexts.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.
This website uses some useful cookies to store your preferences.