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:
VaR cmgr = components. classes ["@ mozilla.org/cookiemanager1_1"]. getservice ();
Because XPCOM will introduce a lot of cumbersomeCodeTherefore, I 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.