I'm thinking about killing most of nsIXULBrowserWindow , which was just a
scriptable interface for the then non-scriptable nsIWebProgressListener, so that
may be a bad idea.

Since nsIWebProgressListener is scriptable now, I suggest you use that. For a JS
example, see http://bugzilla.mozilla.org/showattachment.cgi?attach_id=26364.

If you have any questions, feel free to e-mail me or find me on #mozilla
(irc.mozilla.org).

  jag

Martin Karlsson wrote:

> Yes, let your XPCOM class implement nsIDocumentObserver. Then once you got the
> window, grab the document and add yourself (this pointer) as a listener. You
> will then get notified on document loads etc. Please tell me if you need
> example code.
>
> If you want to get this kind of notification in JS, implement
> nsXULBrowserWindow in your chrome. Have a look at the file aphrodite.js in the
> aphrodite chrome for an example.
>
> /martin
>
> Tom McSherry wrote:
>
> > Hi - I have an XPCOM object that is handed the window object by some js.  Is
> > there a way to register a listener from this dll once so that I get notified
> > of a new page load in the browser?
> >
> > Thanks - Tom


Reply via email to