On Tue, 16 Sep 2003 01:20:26 -0700, piercarlo wrote:

> Hi all,
> 
> I wrote a sidebar extension that waits for EndDocumentLoad event and
> then do some actions with the new url; as usual, this has been done
> with code like this:
> 
> -------------------------
> var oObsService =
> Components.classes["@mozilla.org/observer-service;1"].getService();
> oObsInterface =
> oObsService.QueryInterface(Components.interfaces.nsIObserverService);
> oObsInterface.addObserver(myObserver, "EndDocumentLoad", false);
> -------------------------
> 
> My question is: how can I detect when a tab (with some page yet
> loaded) is taken to foreground (so I can change accordingly the
> content of my sidebar)? Is there some proper event to be used with
> addObserver()?
> More in general, where can I find a list with all the events?
> 
> Thanks a lot!
> bye
> piercarlo

I'm not sure but you have to add a progressListener to the tab browser
object to know the location change (so the tab change). you can check the
follow events :
        onStateChange
        onProgressChange
        onLocationChange
        onStatusChange
        onSecurityChange


//Sorry for my English

Reply via email to