title: Chrome: Cannot read property 'getAll' of undefined
body: <p>I'm new to Javascipt and just trying out some examples I found in the net. This one doesn't work at all. I open about:blank in Chrome and use a Console there. When I run this code there's an error <code>Cannot read property 'getAll' of undefined'</code>.    </p>
  
  <pre><code>chrome.windows.getAll({populate:true}, getAllOpenWindows);
  
      function getAllOpenWindows(winData) {
  
        var tabs = [];
        for (var i in winData) {
          if (winData[i].focused === true) {
              var winTabs = winData[i].tabs;
              var totTabs = winTabs.length;
              for (var j=0; j&lt;totTabs;j++) {
                tabs.push(winTabs[j].url);
              }
          }
        }
        console.log(tabs);
      }
  </code></pre>
  
  <p>Also it seems like <code>chrome</code> doesn't have property <code>windows</code> in it...</p>