XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and scripting programming language like JavaScript.
A main goal is that objects communicating from either side of an XPCOM style interface should not generally need to know or care about the implementation language of the object on the other side of the interface.
XPConnect's primary reason for existence is to replace handwritten code used in places where native code needs to interact with JavaScript code.
NationMaster - Encyclopedia: XPConnect(Site not responding. Last check: )
XPConnect (Cross Platform Connect) is a technology which enables simple interoperation between XPCOM and scripting programming language like JavaScript.
XPConnect's primary reason for existence is to replace handwritten code used in places where native code needs to interact with JavaScript code.
XPConnect is a technology which enables simple interoperation between XPCOM and JavaScript.
XPConnect is a technology which enables simple interoperation between XPCOM and JavaScript.
The XPIDL compiler is used to generate both C++ header files and XPConnect typelib files.
The typelib files allow the XPConnect glue code to dynamically build proxy objects at runtime to dispatch method calls and handle property accesses between XPCOM and JavaScript objects.
The source of this problem was that xpconnect was giving the calling JS code direct access to the underlying JSObject of the JS Component.
This meant that the caller had access to all of the methods and properties of the JS Component and was not limited by the declared interface.
This means that when the JS Component is created and handed to native code xpconnect builds a wrapper to be used by the native code AND when that wrapper is later handed to JS code then xpconnect builds a wrapper around that wrapper for use from JS.
In Mozilla, XPConnect is the bridge between JavaScript and XPCOM components.
Using JavaScript and XPConnect, you can create instances of these components and use their methods and properties as you do any regular JavaScript object, as described here.
In Example 5-11, an HTML file (stored locally, since it wouldn't have the required XPConnect access as a remote file because of security boundaries) loaded in Mozilla instantiates a Mozilla sound component and plays a sound with it.
Aggreg8.net: Philip Roche(Site not responding. Last check: )
XPCOM (Cross Platform Component Object Model) and XPConnect (Cross Platform Connection to Components) are complementary technologies that enable the integration of external libraries with XUL applications.
Together, XPCOM and XPConnect enable developers to create XUL applications that require the raw processing power of compiled languages (C/C++) or access to the underlying operating system.
The main feature of XPCOM and XPConnect that was used in Aggreg8 was the ability to manipulate an RDF (Resource Description Framework) file.
They are manufactured by XPConnect in order to cache the results of a QI performed by script code manipulating a wrapped native.
Every time a script accesses it as an nsIFoo, XPConnect is obliged to QI the nsISupports to nsIFoo.
To avoid doing this on every call, XPConnect builds a an XPCWrappedNativeTearOff after the first QI and stores an XPCNativeInterface, a reflected JSObject, and the nsISupports returned from the QI (which may itself be a normal XPCOM tearoff, so is not necessarily the base nsISupports).
The prototype objet that XPConnect creates for the classes that have classinfo are shared within a scope (window).
As the prototype property of the constructor function is being defined, the code also sets up the prototype of the prototype property of the constructor function (i.e.
The beauty of this code is that the prototype property of a class constructor is the real XPConnect prototype for that class.
This can mean there will be XPConnect wrapper objects showing up as owning the leaked objects, but it doesn't mean it's XPConnect's fault (although that has been known to happen, it's rare).
Debugging leaks that go through XPConnect requires a basic understanding of what XPConnect does.
XPConnect allows an XPCOM object to be exposed to JavaScript, and it allows certain JavaScript objects to be exposed to C++ code as normal XPCOM objects.
If you want scripting in Mozilla then the use of XPConnect via the NPAPI is the only recommended method and strongly encouraged - it's actually a lot more powerful and tightly coupled to Mozilla (e.g.
Uses an XPConnect Type library (XPT file) to define the scriptable API to the browser.
The XPConnect implementation relies on the nsIVariant object supported by Mozilla 1.0 and later.
Javascript File i/o - MozillaZine Talkback(Site not responding. Last check: )
There may never be one, because XPConnect is so broad and easily extensible.
All access to XPConnect is considered as high risk, i.e., UniversalBrowserAccess.
There is no low risk access to XPConnect or XUL, which is why the term "skins", as used in the mozilla codebase, does not allow for customizable button functionality.
Thus, we are able to get by with far fewer interfaces supported in the C++ level, and defer most things to the Python code that uses XPConnect.
There are, however, a number of interfaces that do require native C++ support: these are interfaces required to "boot" the XPConnect support (i.e., the interfaces that are used to get information about interfaces), and also two gateways that need to work without interface information available.
This last requirement is due to the XPCOM shutdown-ordering - it may be a bug, but is not an unreasonable amount of code anyway.
Plug-ins that formerly used LiveConnect to make themselves scriptable in 4.x Netscape browsers have lost this possibility in the new XPCOM architecture upon which Netscape Gecko-based browsers are based.
Where LiveConnect was a bridge between Java and JavaScript, XPCOM is a more general framework for making components scriptable from the browser.
In order to make plug-ins accessible via XPConnect, however, some changes have been made to the Mozilla code, and there are also some modifications you will have to make to your plug-in code.