Getting this does work, but the value returned on the windowsarray [index].tabs[0].title is not the value given to the window during the window.open call.
If I call window.open( blah, "mypage", blah) I was expecting to get "mypage" as the title. The value I am getting is the real title that appears on the window to the right of the Chrome logo in the upper left of the window. The value that I am looking for is found on the window DOM object. It's window.name. window.name is what is set by the second parm in the window.open call. On Sep 24, 12:09 am, Erik Kay <erik...@chromium.org> wrote: > title is in the tab object. A window object always has at least one > tab. Just ask for the selected tab and get its title. > > Erik > > > > On Wed, Sep 23, 2009 at 7:33 PM, Joe Ceklosky <jfceklo...@gmail.com> wrote: > > I think it would also be nice for the windows array list that comes > > back from the getAll call to include the window names (from the window.open > > call).On the window.open call, the seconds parameter is the name of the > > window. > > If I had the name of the window as a property on the Window > > object(returned in window array), I could find the window created > > by window.open that I was looking for. > > > Erik Kay wrote: > > >> On Wed, Sep 23, 2009 at 6:20 PM, Joe Ceklosky <jfceklo...@gmail.com> > >> wrote: > > >>> Erik, > > >>> Thanks for the reply. > >>> The reason I was looking for this information is I wanted to change the > >>> position > >>> on the screen or URL on these windows. > > >> I see. We should probably expose size and position changing to the > >> chrome.windows API. In the meantime you could inject a content script > >> into the page if you needed to manipulate its DOM window object: > > >>http://code.google.com/chrome/extensions/trunk/tabs.html#method-execu... > > >>> Some of my application from the extension would be using chrome.windows > >>> API's while the rest of the application would be using window.open. > > >>> I asked a question earlier about chrome.windows.getAll() which returns an > >>> array of windows. This returned array DOES include windows created > >>> by chrome.windows.create and windows created by window.open. All of > >>> the windows in this array have ID's and etc. > > >>> Is chrome.windows.getAll() working as designed, meaning it's array should > >>> include both chrome.windows and window.open call? > > >> Of course. Windows are windows. It doesn't matter how they were > >> created. If the user hit ctrl-n, or if you called window.open, etc. > >> They're all windows, right? However, whenever chrome.windows.* APIs > >> return a Window, it's an extensions API Window, and not a DOM window. > >> Again, this is independent of how it was created. > > >> Erik > > >>> Joe > > >>> Erik Kay wrote: > > >>>> On Wed, Sep 23, 2009 at 11:18 AM, jfc <jfceklo...@gmail.com> wrote: > > >>>>> chrome.windows.create will create a new browser window and return the > >>>>> window ID in the provided function callback. > > >>>>> The standard javascript window.open returns a window object (browser > >>>>> sense). > > >>>>> When using chrome.windows.getAll(), an array of Windows is given to > >>>>> the callback function. This Window array is NOT the same as the > >>>>> Window object returned from the window.open call. > > >>>>> Is there any way given the window object from the window.open call to > >>>>> locate this particular window in the array returned from the > >>>>> chrome.windows.getAll function callback? > > >>>> No. This is by design. > > >>>> These windows mostly exist in different processes. We don't have > >>>> access to out of process window objects. There are a lot of things > >>>> that would break if we tried to do this. > > >>>> Could you give me an idea of the problem you're trying to solve? > > >>>> Erik- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en -~----------~----~----~----~------~----~------~--~---