Hi Tom,

I see you put "undefined" that is not correct. According to the docs,
getAllWindow requires a window Id.

To get all the windows, you can use
http://code.google.com/chrome/extensions/windows.html#method-getAll, to get
the current window, you can use
http://code.google.com/chrome/extensions/windows.html#method-getCurrent

<http://code.google.com/chrome/extensions/windows.html#method-getCurrent>An
example to get the tab names from all the windows:
<script>
  content = document.getElementById('some_id');
  chrome.windows.getAll({}, function(windows) {
    for (var i in windows) {
      chrome.tabs.getAllInWindow(windows[i].id, function printTabs(tabs) {
        for (var i in tabs) {
          var p = document.createElement('p');
          p.appendChild(document.createTextNode(tabs[i].url));
          content.appendChild(p);
        }
      });
    }
  });
</script>

<div id="some_id"></div>


On Thu, Dec 10, 2009 at 12:45 PM, Tom <[email protected]> wrote:

> Does anyone know whats wrong with it?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Chromium-extensions" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<chromium-extensions%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/chromium-extensions?hl=en.
>
>
>


-- 
Mohamed Mansour

--

You received this message because you are subscribed to the Google Groups 
"Chromium-extensions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/chromium-extensions?hl=en.


Reply via email to