title: Expose an XPCOM component to javascript in a web page
body: <p>I'd like to write a XPCOM component that gets exposed as a javascript object in a web page.  Something like Google Gears is what I'm seeking.  That is, after installing the Google Gears Firefox extension, the javascript object 'google.gears' is available to any web page that wants to use it.  I've found lots of mozilla documentation on XPCOM development, but nothing on exposing the component to javascript running in a web page.  Is this possible with XPCOM?  Do I need to write a Firefox plug-in instead of an extension?</p>