I have a sendMessage method where I am supposed to get a response back from my background script.
However, sendMessage doesn't return anything, and to get the response, I have to use their built-in responseCallback function
chrome.runtime.sendMessage({ request: 'requestvalue' }, response => {
console.log(response);
})
Is there a way for me to get my "response" value as a return value so that I can use it later?
something like this...
const response = chrome.runtime.sendMessage({ request: 'requestvalue' });