Answer the question
In order to leave comments, you need to log in
Chrome extension switching tabs?
Hello!
In from the background page I open 2 tabs.
I execute a simple script in tab 1 (content_scripts)
after that I send chrome.runtime.sendMessage to the background page that the script is done.
The background page makes tab 2 active.
And I need to insert var text into this tab 2; (content_scripts) - continuation
But for some reason it is executed in tab 1. Although tab 2 is already open. var text = document.getElementById('txt').value
document.getElementById('new').value = text;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question