According to the documentation for chrome.tabs.executeScript (MDN), the callback function accepts an array of any result result set from the execution of the script(s). How exactly do you use this to get results? All of my attempts end up with undefined
being passed to the callback.
I have tried returning a value at the end of my content script, which threw a Uncaught SyntaxError: Illegal return statement
. I tried using the optional code object argument {code: return Hello;}
with no success.
I feel like I am not understanding what is meant by The result of the script in every injected frame, in the documentation.