Changes

Jump to: navigation, search

XPConnect

3,860 bytes added, 12:29, 6 October 2006
Relevant Resources
Coming Soon!=About XPConnect= ==Description==XPConnect is a technology that is used to link [[XPCOM]] and scripting languages like Javascript together.  ==Discussion==XPConnect allows JavaScript objects to transparently access and manipulate [[XPCOM]] objects. It also enables JavaScript objects to present [[XPCOM]] compliant interfaces to be called by [[XPCOM]] objects. 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. An example is the DOM module. In order for XPConnect to properly function with [[XPCOM]] interfaces, it must be declared using [[Researching_XPIDL_and_IDL_Technologies|XPIDL]]. The XPConnect does not support the scripting of MS COM objects. It also does not support any interfaces that are not declared within [[Researching_XPIDL_and_IDL_Technologies|XPIDL]]. While [[XPCOM]] objects are mainly supported, it does not support scripting of [[XPCOM]] objects that break conventions in [[XPCOM]]. E.g. non-standard return types, use of C++ default parameters, assumptions about the underlying C++ type of the object implementing a given interface, etc. ==Relevant Resources== Links to Tutorials: * [http://www.mozilla.org/scriptable/ In depth detail about XPConnect]* [http://www.mozilla.org/scriptable/components_object.html The XPConnect 'Components' Object Reference]* [http://www.mozilla.org/scriptable/javascript-stack-dumper.html JavaScript Call Stack Dumper Reference]* [http://www.mozilla.org/scriptable/XPCShell.html XPCShell Reference]* [http://www.mozilla.org/scriptable/js-components-status.html JavaScript XPCOM Components Status]* [http://www.mozilla.org/scriptable/avoiding-leaks.html Using XPCOM in JavaScript without leaking]*[http://www.mozilla.org/scriptable/http://lxr.mozilla.org/mozilla/source/xpcom/doc/xpcom-component-registration.html Dynamic Component Registration] describes how to register your xpcom component so that it can be used from within Mozilla* [http://www.w3.org/DOM/ Document Object Model (DOM)]* [http://www.mozilla.org/scriptable/roadmap.html Roadmap for XPCOM, XPConnect, XPTCall, and XPIDL] Links to Examples:* [http://lxr.mozilla.org/seamonkey/source/xpcom/sample/ Simple XPConnect Sample]* [http://lxr.mozilla.org/mozilla/source/js/src/xpconnect XPConnect source code] Links to FAQ:* [http://www.mozilla.org/scriptable/faq.html XPConnect and XPIDL FAQ] Other Useful Links:* [http://www.mozilla.org/scriptable/../projects/xpcom/index.html XPCOM page] * [http://www.mozilla.org/scriptable/xpidl/index.html XPIDL page]* [http://www.mozilla.org/scriptable/typelib_file.html typelibs] * [http://www.mozilla.org/scriptable/xptcall-faq.html xptcall]*[http://www.mozilla.org/scriptable/http://bugzilla.mozilla.org/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&component=XPConnect Open bugs against XPConnect]* [http://www.mozilla.org/scriptable/zero-generated-code-proposal.html XPConnect runtime proposal]* [http://www.mozilla.org/scriptable/interface-plans.html XPConnect runtime interface thoughts]* [http://www.mozilla.org/scriptable/scriptable-proposal.html Proposal for reflecting dynamic properties]* [http://www.mozilla.org/scriptable/xpjs-components.html XPJS Components Proposal] Links to Newsgroups:* [news://news.mozilla.org/netscape.public.mozilla.xpcom mozilla.xpcom newsgroup]* [http://groups.google.com/group/mozilla.dev.tech.xpcom Google Group: Mozilla.dev.tech.XPCom] Links to IRC Channels: * [irc://irc.mozilla.org/js #JS]* [irc://irc.mozilla.org/developers #Developers]  Summarized By: Vanessa Miranda & Philip Vitorino
1
edit

Navigation menu