Converting an object back from nsISupports to Javascript Object or Array ( { } or [ ] )
"Kok Hoor \(SolutionX\)" <[email protected]> Wed, 9 Oct 2002 16:07:14 +0800
| Newsgroups | gmane.comp.mozilla.devel.xpcom |
|---|---|
| Message-ID | <000001c26f6a$e41bd140$0300a8c0@kokhoorcompaq> |
Hi,
I am using the mozilla observer service for notification
between different windows, using javascript. One problem I face is,
when I called the notifyObservers interface like this:
var subject = { test : 1 };
observerService.notifyObservers( subject, "topic", "data" );
I am only getting an nsISupports as the subject when the observers
receive the notification. My question is, how should I QueryInterface on
the subject to retrieve either a:
1. Javascript object
2. Javascript array
Thanks in advance.
Regards,
Kok Hoor