title: How to access internal resources from background.js
body: <p>In a Google Chrome application is it possible to access bundled data files from within the <code>background.js</code> script?</p>
  
  <p>E.g. if I had a file called <code>data.json</code> that I include with the app, is there a JavaScript API that I could use in the <code>background.js</code> script to get at the files contents?</p>
  
  <p>With the example bundle directory structure:</p>
  
  <pre><code>/app/manfifest.json
  /app/backround.js
  /app/data.json
  </code></pre>
  
  <p>I want to do something like:</p>
  
  <pre><code>chrome.app.runtime.onLaunched.addListener(function() {
    data = unknown.api.loadFileSync("data.json");
    // do stuff with data
    // ...
  });
  </code></pre>