title: Open links in new tab chrome packaged app
body: <p>I've created a simple chrome app that has  links, at the moment none of the links are working, even using <code>target="_blank"</code> wouldn't work so I thought I was stuck until I found <a href="https://developer.chrome.com/apps/browser#method-openTab" rel="nofollow noreferrer">openTab</a>. Though, I'm new to javascript never mind Chrome Apps so I'm don't know how to actually implement this into my code so that I can open links in new tabs.</p>
  
  <p>I have tried this:</p>
  
  <pre><code>$(".logo").click(function(){
       chrome.browser.openTab({ url: "http://www.google.com/" }, callback);
  });
  </code></pre>
  
  <p>Which gives me this error when I click on logo:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'openTab' of undefined
  at HTMLImageElement.&lt;anonymous&gt; (script.js:126)
  at HTMLImageElement.dispatch (jquery-3.1.1.min.js:3)
  at HTMLImageElement.q.handle (jquery-3.1.1.min.js:3)
  </code></pre>
  
  <p>My Manifest: </p>
  
  <pre><code>{
  "name": "example",
  "description": "example",
  "version": "1.0",
  "manifest_version": 2,
  "app": {
  "background": {
    "scripts": ["background.js", "script.js"]
  }
  },
  "permissions": ["browser"],
  "icons": {
  "128": "logo.png"
  }
  }
  </code></pre>