Leonard Ritter wrote:
hi everybody,

can someone give me more information on whether and if it is possible:

1. to be notified of mozilla browsers being opened or closed in the
system (such as windows' IShellWindows does it) or at least enumerate
running browsers in the system

You might want to look into the RDF datasource rdf:window-mediator

http://www.xulplanet.com/references/elemref/ref_rdfwindow-mediator.html

This will enable you to see which windows are open. If you create an observer to watch changes to this datasource, you can have your code triggered when windows are opened/closed.

2. to connect to a/read from an html document running in an existing
mozilla browser window in another process (such as IEs IWebBrowser2 and
IHTMLDocument interfaces support it)

I'm not sure if there is a more official (read: easier) way of getting at this, however, the browser content for a given window can be accessed by using:


window.getElementById('content').contentDocument

This returns an HTMLDocument object (if the content of the current browser window is HTML). If you use the window mediator to get a reference to another window, you can use the above code (or other DOM methods) to get at the HTML content.

3. to be notified of document loading state changes and user navigation
actions, with accompanying GET or POST variables being sent in an
existing mozilla browser window in another process (as IEs IWebBrowser2
interfaces support it)

You might want to look at how the "Live HTTP Headers" Mozilla/FireFox extension works. There's some good code in there that can get you started on the right path.


i've seen several classes in the documentation that could provide access
to 2 and 3, but 1 seems to be missing and there is virtually no
information on cross process communication.

I can't say for certain, but from what I know of how Mozilla is built, all windows run under the same process. So cross-process communication isn't an issue.


--
Michael A. Nachbaur <[EMAIL PROTECTED]>
http://nachbaur.com/pgpkey.asc
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to