Henrik Ravn wrote:

>Hi!
>
>How do I call into the embedding C++ code from javascript in the rendered
>html?
>
>(When embedding IE there is the window.external method, I'm wondering what
>the equivalent technique is in mozilla...)
>
>tia
>Henrik
>
It's possible but tricky to do at present. One way is to write a C++ 
XPCOM object implementing an interface such as nsIObsever and publish it 
as a service when your embedding app starts. Then write some chrome that 
sits between the embedding app and the content and which contains the JS 
that calls it by querying for the service and calling methods on the 
interface.

I have raised bug 86421 to discuss whether this could be made simpler 
for embedders..

Adam

Reply via email to