[Project_owners] datasource observer

Michael Vincent mv_van_rantwijk at yahoo.com
Wed Sep 28 04:17:31 EDT 2005


Jeroen Groenenboom wrote:
> It's still there:
> 
> var hiddenWindow = 
> Components.classes["@mozilla.org/appshell/appShellService;1"]
> .getService( Components.interfaces.nsIAppShellService )
> .hiddenDOMWindow;
> 
> // eval exp to clone object (ordinary assignment didn't work)
> hiddenWindow.bmhBookmarksObserver = eval( 
> bmhBookmarksObserver.toSource() );
> bmds.AddObserver( hiddenWindow.bmhBookmarksObserver );
> 
> and it works...until the root window closes :-( (it was a good idea 
> however, hope you have more :-)),
> Jeroen

Look at bmds! Isn't that defined in one of the 'normal' browser windows?
So what do you think happens when you close that window?

> ps
> The nsIAppShellService also has a method createHiddenWindow but it's not 
> scriptable

You really don't want to add another hidden window, but use the one 
available.

Michael


More information about the Project_owners mailing list