title: How to close the current extension tab?
body: <p>I'm trying to close the Options page of the extension.
  I have a Cancel button and I'm using this code:</p>
  
  <pre><code>chrome.tabs.getCurrent(null, function(tab) {
    chrome.tabs.remove(tab.id, function() {});
  });
  </code></pre>
  
  <p>When I'm trying to use it, it always gives this error:</p>
  
  <pre><code>Uncaught TypeError: Cannot call method 'getCurrent' of undefined
  </code></pre>
  
  <p>What's wrong with the code?</p>