title: chrome.extension.getBackgroundPage() function example
body: <p>I'm working on a small Chrome extension that needs to run in the background. However, I understand that that isn't possible when I'm using a popup. After some reading it seems that the best option is to create <code>popup.js</code> in order run the <code>background.js</code>, using <code>chrome.extension.getBackgroundPage()</code> function. </p>
  
  <p>Can someone please show me an example of how it's done?</p>
  
  <p>here's the manifest:</p>
  
  <pre><code>"browser_action": {
  "permissions": ["background"],
  "default_popup": "popup.html"},
  "options_page": "options.html",
  "background": {
      "scripts": ["background.js"],
      "persistent" : true
  }
  </code></pre>
  
  <p>I've included the popup.js reference in <code>popup.html</code>:</p>
  
  <pre><code>&lt;script src="popup.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>And created a variable in <code>popup.js</code></p>
  
  <pre><code>var bkg = chrome.runtime.getBackgroundPage();
  </code></pre>
  
  <p>so now I need a way to activate the <code>background.js</code>
  Do I need to run the relevant function inside <code>background.js</code> from <code>popup.js</code>, 
  or give a general command for the <code>background.js</code> to run?</p>