[Project_owners] Initialising an extension once per session

Eric H. Jung eric.jung at yahoo.com
Tue Jul 15 11:19:51 PDT 2008





----- Original Message ----
> From: Myk Melez <myk at mozilla.org>
> To: Mozdev Project Owners List <project_owners at mozdev.org>
> Sent: Tuesday, July 15, 2008 2:09:08 PM
> Subject: Re: [Project_owners] Initialising an extension once per session
> 
> Eric H. Jung wrote:
> > To follow-up on my own suggestion:
> > 
> http://mxr.mozilla.org/seamonkey/source/browser/components/sessionstore/src/nsSessionStore.js
> > shows a few dispatchEvent() calls, dispatching SSTabRestoring, SSTabRestored, 
> SSTabClosing, etc.
> >
> > Would observing one or more of these suffice?
> >  
> If you want to wait until session store is finished restoring windows 
> and tabs, you can observe the sessionstore-windows-restored 
> notification.  A variety of other startup notifications are also available:
> 
> http://developer.mozilla.org/en/docs/Observer_Notifications#Application_startup

I wonder if the session-related events fire if there's no session to restore? If not, Brian might be better off listening for profile-after-change or similar. Pretty sure that would only fire once regardless of how many browser windows are opened (assuming the user isn't starting with -no-remote)


      


More information about the Project_owners mailing list