mathieu: in the XPCOM case, at least, we can enumerate all known interfaces (and implementations) -- from an interpreted language, no less! -- regardless of which ones are currently instantiated.
(Don't mind the silly implementation naming; it's going to change.)js> for (i in Components.interfaces) print (i); nsISupports nsILocalFile nsIForwardIterator nsIRDFXMLSinkObserver ... js> for (i in Components.classes) print(i); mimecth:application/x-pkcs7-mime component://netscape/messenger/stringservice?type=pop3 component://netscape/messenger/stringservice?type=smtp component://netscape/intl/charsetdetect?type=ruprob component://netscape/intl/charsetdetect?type=ukprob ...
So yeah, an object browser in XUL and JS is quite possible, though you probably want some runtime hooks as well to get handles to pre-existing instances.