Answers for "chrome extension communication between popup and content script"

1

chrome extension communication between popup and content script

chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
    chrome.tabs.sendMessage(tabs[0].id, {type:"getText"}, function(response){
        alert(response)
        $("#text").text(response);
    });
});
Posted by: Guest on July-10-2021

Code answers related to "chrome extension communication between popup and content script"

Code answers related to "Javascript"

Browse Popular Code Answers by Language