Communication from an injected script to the content script with a response
Following this question , communicating between an injected script and content script can be made that way: // Content script window.addEventListener("getChromeData", function(data) { // do Chrome things; }, false); // Injected script window.dispatchEvent(new CustomEvent("getChromeData", {data: 'whatever'})); I wanted to know if there is a way to make use of returned data into the injected script, using a promise or a callback mechanism? The communication back is again done with an event. You can use a one-shot listener to achieve a promise-based response. I will be passing an extra request ID