Try passing null for the windowId instead of undefined.
On Thu, Dec 10, 2009 at 10:28 AM, Mohamed Mansour <m...@chromium.org> wrote: > 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 <tommm...@ymail.com> 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 chromium-extensions@googlegroups.com >> . >> To unsubscribe from this group, send email to >> chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com> >> . >> 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 chromium-extensi...@googlegroups.com. > To unsubscribe from this group, send email to > chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/chromium-extensions?hl=en. > -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.