There are Mozilla's XPCOM objects like "@mozilla.org/xmlextras/ xmlhttprequest;1" (nsIXMLHttpRequest, nsIJSXMLHttpRequest) and @mozilla.org/xmlextras/domparser;1 (nsIDOMParser) which are registered as XMLHttpRequest and DOMParser. These xpcom objects are able to return nsIDOMDocument and other nsI* objects. And also register listeners to the XPCOM objects. They are however written in C++ whereas I've written my XPCOM object in JS.
> unfortunately, you don't > have enough information to do this, see below.... Is there a link or example or document on this? (Not sure if, "see below...." is a missing link in your reply.) Thanks -a On Jul 15, 1:29 am, timeless <[EMAIL PROTECTED]> wrote: > On Jul 10, 2:23 am, Ashish <[EMAIL PROTECTED]> wrote: > > > 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. > > you're being rejected because they are enforcing security policies. > you should create very cautious wrappers. unfortunately, you don't > have enough information to do this, see below.... > > > 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. > > that's correct, this is a bug (I believe I filed it), there's no way > to get back to the window object from javascript addons. _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
