Derek Lio wrote: > Thanks you, I've got the concept. when i first looked at XPCOM (two days > ago), i just wondered how it is simiilar to the MS one. could u recommand > some references site abt XPCOM and how it be implemented in JavaScript?
Generically, look under XPCOM here ... http://www.mozilla.org/docs/ Sometimes a working example is worth a thousand words. Here's the javascript version of the nsSample component (compare side-by-side to it's C++ implementation in nsSample.cpp). http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSample.js If you understand function objects in JavaScript then this should be easy. -rick
