Hi,
I was wondering about implementing CallBacks - Calling Javascript functions
from an XPCOM object. I am not sure about how to correctly implement this.
At present I have a Javascript function which I wish to call.
function WebTerm_ConnectionOpened(success) {
if (success)
alert("The Connection was made!")
else
alert("The Connection Failed.");
}
I also have a function defined to intiate the open connection - with a
Callback function description.
function OpenConnection(theSession) {
theSession.OpenConnection(true, 300 ,"WebTerm_ConnectionOpened()");
The open connection routine works fine - but would like to get the CallBack
operation working. How should the IDL file be setup?. Is this to be
defined as a inout attribute?. What is the return parameter needed to
enable a Callback function to work?.
Would be very grateful for some input on this.
Regards
Patrick McHale
Powerlan USA