Xp com can be regarded as an open-source version of Microsoft COM, but the current application scope is limited, mainly because the gecko engine of firefox is in use.
Xpcom is not a browser plug-in, but a browser itself. Firefox is composed of a bunch of xpcom components. In Firefox, basically all browser-related functions are defined as components, including webpage navigation, window management, cookie management, bookmarks, security, search, other functions such as retouching are provided by the component interface.
Chrome does not contain xpcom and does not use xpcom technology. Chrome uses the webkit engine.
The following describes how to use the xpcom component in javascript:
[Javascript]
Var cmgr = Components. classes ["@ mozilla.org/cookiemanager1_1"]. getService ();
Because xpcom introduced a lot of cumbersome code, it was criticized a lot. It is said that gecko developers are reducing the use of xpcom.
Therefore, unless you have a special reason to rewrite firefox itself (not plugin), you do not need to go into the details of xpcom.