In my chrome extension I need to pass a variable to the injected script before execution. This is important because the variable that the user is inputting in the chrome extension is needed to run the injected script. When the injected script has finished it should pass one variable to the content script. I´ve tried to find answers on the internet for so long but nothing helped me. I tried local storage, sendRequest, addEventListener and so on. So I want to know if there is a way for me to do that? If so I would appreciate it if you could give me an example and/or an article.
Note: I found quite similiar question here on stackoverflow but nothing helped me for my problem.