Hi, all:
I write a javascript xpcom component, and want to send some data
througn
nsIObserver, and access the data in javascript.
the origin data is the JSObject,but the xpconnect wrap the data to
nsISupports, I have tried to QueryInterface,
but don't know which interface should I query. I have no idea to
access
the origin data.
Excuse mine poor english, I paste the simple code here:
// in component
function Task() {
}
Task.prototype = {run:function () {
var obj = {};
//send the javascript object back through observer;
this.callback.observe(obj, "task begin", null);
}, setCallback:function (cb) {
this.callback = cb;
return this;
}};
// nsIObserver in invoker.
Callback.prototype.observe = function (target, subject, param) {
//how to convert the target(nsISupports) to javascript object;
};
welcome any suggestion.
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom