title: Google Chrome: can't get current tab's url
body: <p>I have the following function in my chrome extension's background.js to get the current tab's url:</p>
  
  <pre><code>function getCurrentUrl() {
      chrome.tabs.query({currentWindow: true, active: true}, function(tabs) {
          var tab = tabs[0]
          var keys = []
          for(var key in tab) keys.push(key + '-' + tab[key])
          alert(keys.join(', '))
      })
  }
  </code></pre>
  
  <p>But, the alert dialog shows me:</p>
  
  <pre><code>active-true, height-456, highlighted-true, id-301, incognito-false, index-6, pinned-false, selected-true, status-complete, width-717, windowId-262
  </code></pre>
  
  <p>The 'tab' object doesn't seem to have a url property, as suggested by other answers on SO. What am I doing wrong?</p>