Thanks, that trick worked a little around the horn to get the anwer!

Overall it might be easier if the chrome extensions would keep track
of the name used on window.open calls (second parm) and expose the
window.name on the chrome Window object.

This would be very helpful when using chrome.windows.getAll()
and you are looking for a specific window created by window.open


On Sep 24, 8:51 am, Daniel Wagner-Hall <dawag...@gmail.com> wrote:
> On Thu, Sep 24, 2009 at 12:49 PM, jfc <jfceklo...@gmail.com> wrote:
>
> > 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.
>
> I believe the only place you can access the DOM window of a page from
> an extension is a content script...
>
> My way of dealing with a somewhat similar situation is that I have a
> content script which opens a port to the background page using, with
> its name set to the window name
>
> chrome.extension.connect({name: window.name})
>
> And then in the background page you can make an onConnect listener
> when has access to the port, so you can port.tab.id, as well as
> port.name, and you can correlate what you need accordingly.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to