I would like to do something like http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsDOMClassInfo.cpp does to create DOM extensions, but in JavaScript... if it possible to do that?
Thanks -a On Jul 9, 4:25 pm, Ashish <[EMAIL PROTECTED]> wrote: > I have created XPCOM component with nsIClassInfo.flags = > nsIClassInfo.DOM_OBJECT and is registered it as a "JavaScript global > property" with nsICategoryManager. Hence the instance of this class > is > injected into all window objects, i.e. window.myXPComp. And I'm able > to access the XPCOM component and call methods on it from any webpage > domain. However, I can't access properties and methods of return > XPCOM > types, say nsIDomDocument or nsIInputStream, being returned by the > method. I guess, since they aren't registered with "JavaScript Global > property", I get permission denied on accessing them. How can I > access > nsI* returned objects on the web page now? Can I wrap the object > somehow, or do I need to create a wrapper XPCOM object with > "JavaScript global property" set. > > I also tried to modify the navigation window's DOM from inside the > xpcom component in the extension. However, I can't get a hold of the > window object for the navigation window. nsIWindowMediator and > nsIWindowWatcher both return only one window object, the > chromeWindow, > while enumerating. Is there an alternative way of passing objects > from > within an xpcom component in an extension to a web page? _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
