title: Using background.js variables in chrome.tabs.executeScript
body: <p>With <code>chrome.tabs.executeScript</code>, how can I use a variable from background.js in the inserted content script? I mean something like this:</p>
  
  <pre><code>(...)
  var identificador = target.selectionText;
  chrome.tabs.executeScript(null,
                         {code:"alert(identificador);"});
  (...)
  </code></pre>
  
  <p>That is just a example invented about I need to do. In my extension, my goal is set a variable with a portion of text selected (using context menus) and when the web is reloaded, search it in the document and if found a match, alert me. The only way that I know to do this is using regex and <code>document.body.innerText</code>, but I believe that I only can use <code>document.body.innerText</code> injecting JS with <code>executeScript</code>. So... exists any better way to do it? And if not, how I can send my variable with the text portion to the code executed by <code>executeScript</code>?</p>