Re: Recover the attributes of "window.open" without new window

"Nicolas Albert" <[email protected]>
Newsgroups gmane.comp.mozilla.devel.java
Organization http://groups.google.com
Message-ID <1161070302.213523.225630__46811.6395677955$1161072317$gmane$org@m73g2000cwd.googlegroups.com>
Thank you for your answer,
with the code:
"nsIDocShellTreeItem findItemWithName (String aName,
nsIDocShellTreeItem aRequestor, nsIDocShellTreeItem aOriginalRequestor)
{
   System.out.println ("findItemWithName aName: " +aName+",
aRequestor: " +aRequestor+", aOriginalRequestor: " +
aOriginalRequestor);
   return null; // I also try with this  > return aRequestor;
}"

the out when "window.open("http://www.google.com","
gooooogle")" is called:
"findItemWithName aName: gooooogle, aRequestor:
org.mozilla.xpcom.nsIDocShellTreeItem@1e0be38, aOriginalRequestor:
org.mozilla.xpcom.nsIDocShellTreeItem@1e0be38"

What can I do with the nsIDocShellTreeItem ?
"return null" or "return aRequestor" isn't good because there
is no other call on my windowWatcher.
However, I obtain the second argument "gooooogle".

Good news, I again looked at side of the
"setWindowCreator(nsIWindowCreator creator)".
It there be a IQ of "nsIWindowCreator2", I have implement it, but
its only function is [noscript]
(http://www.xulplanet.com/references/xpcomref/ifaces/nsIWindowCreator2.html),
and it not in JavaXPCom.
I tried to write the prototype in Java:  "public nsIWebBrowserChrome
createChromeWindow2 (nsIWebBrowserChrome relative, long chromeFlags,
nsIURI uri, boolean [] chancel)"
and it goes!
"uri" contains the first parameter of the "window.open".

I will only be satisfied with the uri for the moment, but if it is
possible to have all the parameters of "window.open", I want to
learn it.

Nico
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.