Hi,

I have written an C++ XPCOM component that correctly loads into Firefox
1.5, and I can successfully call methods on the component thanks to
XPConnect.  What I would like to do now is allow the component to call
back into the javascript VM, as I can do with an IE ActiveX control
using ActiveX "events".  Is it possible to do this?  I would guess the
method would be something like this:

- Use the DOM from C++ to find a JS method which must be defined in the
script code of the calling web page.  Alternately this method could be
passed to my component as an argument of some kind.
- Use some kind of magic glue code (nsXPConnect?) to call the JS
function from C++, packaging up the arguments as necessary.

So far I've found nothing to describe this process on the XPConnect
(http://www.mozilla.org/scriptable/) or XPCom
(http://www.mozilla.org/projects/xpcom/index.html) sites, and google
searches haven't helped either.

Can anyone explain A) if what I want to do is possible, and B) how to
do it or at least a pointer to the right header file.

I should point out that I am NOT building the Mozilla source code.  I
am building my component on Win32 using the precompiled gecko SDK
(v1.8b1).

Thanks in advance,
Kevin

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to