On Tue, Sep 14, 2004 at 07:29:06PM -0400, Joe Cheng wrote: > I'm writing a JavaScript XPCOM component (actually service) for a > Firefox add-in, and would like to be able to use some of the JS > functions that come with Firefox (globalOverlay.js, utilityOverlay.js, > etc.). Is there an easy way to do this? I can see that from XUL you > can just <script src="chrome://.../utilityOverlay.js" /> but obviously I > can't do that from a .js file.
You could use http://lxr.mozilla.org/seamonkey/source/js/src/xpconnect/idl/mozIJSSubScriptLoader.idl I think. Here is an example of how to use it: http://lxr.mozilla.org/seamonkey/source/mail/extensions/newsblog/js/newsblog.js#281 -- _______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
