Hi,
Using gecko, you should define an XPCOM class defining a function that
you will implement within your javascrpipt code :
var callback =
{
call : function(argument)
{
...
}
}
then pass this object to your XPCOM coded object :
callbackemitter.setCallback(callback);
and call it from C++ :
void
nsCallbackEmitter::callback()
{
_callback->Call(argument);
}
Stefan Klinger a écrit :
Hello,
i found some hints how to create javascript functions mapped to C++
function which are callable from within the browser, but none
provieded me with a solution how to actually do it.
What i want is something like a Javascript Function for this C/C++
"Callback" inside the embedding code.
void JavascriptCallback(<some string type> argument) {
}
Some Newsgroup Posts said you should use JS_DefineFunction, but i
found no way to create a header from IDL for it nor does any header in
the gecko SDK define it.
Can someone give me a bit of code how to actually do such a thing?
Thanks in regards,
Stefan
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding
---------------------------------------------------------------------------------------
Orange vous informe que cet e-mail a ete controle par l'anti-virus
mail. Aucun virus connu a ce jour par nos services n'a ete detecte.
--
Remy Deslignes
Ingenieur Developement / Software Engineer
Tel: +33 (0)1.53.90.11.19
===========================================
Silicon Worlds S.A.
12, rue de Chatillon
75014 Paris France
Tel: +33 (0)1.53.90.11.11
Fax: +33 (0)1.53.90.11.12
http://www.silicon-worlds.fr
===========================================
_______________________________________________
dev-embedding mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-embedding