How does one go about setting up a JavaScript event handler for a XPCOM
component?   I would like for my XPCOM to generate events which can be
observed and acted upon by a JS function.

ActiveX uses the colon-colon syntax (see below).  Is there something similar
in XPCOM?

syntax in IE:
myObj = new ActiveXObject("MyObjectID");
function myObj::onEvent(i_event)
{
    alert("ActiveX event fired: " + i_event);
}

1) Is there a interface that need to be implemented by the XPCOM component
similar to ActiveX's IConnectionPoint interface?

2) Can it done by passing a JS function pointer to the XPCOM component to be
stored for later callbacks?  If so, are there any XPCOM examples of this?


Thanks in advance,

Jeremy


_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to