Hello Christian et al.,
Thankyou for your response.
First of all, I dont have the nsIDocShellTreeItem.h file in my Gecko SDK
include folder. I guess I just have to get the idl file from mozilla.org
and create the appropriate header file?
Secondly, would you please confirm I understand well what to do?
1. First take the nsIDOMWindow pointer off the HTML document within
nsIWebProgressListener::OnStateChange, for example with state ==
STATE_START | STATE_IS_REQUEST | STATE_IS_DOCUMENT | STATE_IS_NETWORK
for http://www.microsoft.com
2. Query the nsIInterfaceRequestor interface from that nsIDOMWindow
3. GetInterface the nsIDocShellTreeItem
4. Take the root.
And within ::Observe(...), for "domwindowopened" signal, I can do the
same for the nsIDOMWindow obtained there. The ROOT nsIDocShellTreeItem
pointer should be the same??
Thankyou for any suggestion!
Vonuyx
Christian Biesinger wrote:
vonuyx wrote:
I just wonder how I can get the nsIDOMWindow of the chrome window
which contains this webpage (the top chrome window, I guess).
Boris already explained it in
http://groups-beta.google.com/group/netscape.public.mozilla.xpcom/msg/7b7f33bbfc6fbada
...
Maybe you should tell us which part of that you're having problems with?
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom