I am currently facing a challenge in determining the most effective way to communicate with my web application, which is being opened using chrome.windows.create within my extension.
Despite successfully establishing the connection between the content script and background script, I am encountering difficulties when attempting to utilize the value received from the background script in my web application. Specifically, the value needs to be loaded into an editor within the web app.
I have experimented with assigning functions and variables to the window and tab objects, but these seem to disappear once the web app is loaded. Additionally, using chrome.tabs.executeScript allows me to manipulate the DOM but prevents me from setting global variables on the 'window' object.
If no superior method exists, I may have to resort to adding elements to the DOM and retrieving them once the web app has loaded. However, this approach seems less than ideal. Ideally, I would prefer a cleaner solution, such as implementing an onLoadFromExtension function that my web app can execute to obtain the necessary value.