Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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);
    });
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to loop through an object using lodash 
Javascript :: javascript local storage delete 
Javascript :: nodejs get response time 
Javascript :: hide element when pressing button angular 
Javascript :: useHistory goback 
Javascript :: new date with date + 1 
Javascript :: json server npm 
Javascript :: how to generate package-lock.json from package.json 
Javascript :: jquery delete a cookie 
Javascript :: express server template 
Javascript :: js get domain 
Javascript :: how to get os information nodejs 
Javascript :: turn object to json javascript 
Javascript :: sequelize logging insert 
Javascript :: add value to the top of an array in js 
Javascript :: gms2 object method 
Javascript :: vim react snippets 
Javascript :: react redux actions must be plain objects 
Javascript :: javascript order by string array 
Javascript :: javascript format number with commas 
Javascript :: get timezone javascript 
Javascript :: js window redirect 
Javascript :: pick random value from array 
Javascript :: javascript password max length 
Javascript :: json-server 
Javascript :: hello world in jsp 
Javascript :: json parse array local storage 
Javascript :: fs.readdir example 
Javascript :: json schema string or null 
Javascript :: send data through routes in react 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =