title: Chrome extension - pass function result from content script to popup.js
body: <p>I have extension with popup.html which has popup.js in it.
  I use popup.js to call function located in content script using chrome.tabs.sendMessage -method.
  This is working nicely, but..</p>
  
  <p>How do I return the value of the function back to popup.js ? Do I need to set up a listener on the popup.js aswell or what ? </p>
  
  <p>On my popup.js I have:</p>
  
  <pre><code>chrome.tabs.sendMessage(tab.id, {
   expiryRequest: 'expiry '
  }, function (response) {
  if (response.refreshResponse === true) {
   console.log('Expiry taken');
  } else {
   console.log('Expiry NOT taken');
  }
  });
  </code></pre>
  
  <p>This part works great..</p>
  
  <p>On my content script I read certain div into a vartiable "result".
  At the end of the function on content script I have used.</p>
  
  <pre><code>return result;
  </code></pre>
  
  <p>or</p>
  
  <pre><code>return true;
  </code></pre>
  
  <p>None of those returns anything back tuo popup.js.
  What do I need to change in order to get my return to work from content script to popup.js ?</p>