Hi, I have tried everything but i can’t do it.
I keep getting the errors:
Could not establish connection. Receiving end does not exist.
No matching window
I create a new tab this way:
browser.tabs.create({ url: “http://www.mysite.com/page.php”, active: true }, f);
then through
browser.tabs.onUpdated.addListener(myfunc)
I check the tabId and his status to be “complete” before injecting my content script with:
browser.tabs.executeScript(tabId, {file: “/content_scripts/myscript.js”}); (I also tried to use runAt: “document_start” in the extensionTypes.InjectDetails)
chrome.tabs.sendMessage(tabId, null);
If I open the tab manually without using browser.tabs.create everything works fine.