Nanjun Hu wrote:

Hello,
Sorry for the basic question. I just can't find the answer anywhere else.
What I am trying to do is to get the DOM object of the current browsed page whenever mozilla loads a page. Could anyone be kind to tell me what I should do to catch such event and get the DOM object? thanks a lot.
lasco
------------------------------------------------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. *Try it!* <http://us.rd.yahoo.com/evt=21608/*http://webhosting.yahoo.com/ps/sb/>


you'll have to tell us a little bit about your code... are you writing an XPCOM component that will be installed into a mozilla build? in that case, you might look at nsIWebProgressListener and nsIWebProgress. it allows you to receive a notification when each page finishes loading.

the onStateChange method is passed a nsIWebProgress reference, and from that you can access the DOM window of the corresponding page.

i'm not 100% sure that the DOM window will correspond to the DOM window you are interested in. you might need to look at a child node to find the "DOM object of the current browsed page".

darin
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to