The global object in your javascript's execution context is the browser
ChromeWindow itself, which is why "document" resolves to a XULDocument.
To get the content document, you need either "content.document" or
"_content.document". I'm not sure which is preferred ("content" is
listed as a property of ChromeWindow at XULPlanet; "_content" is
mentioned more on mozilla.org pages), but both "content" and "_content"
point to the same window so both calls will get you the HTMLDocument
you seek.
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom