Esta traducción está incompleta. Por favor, ayuda a traducir este artículo del inglés.

An XPCOM Language Binding is a bridge between a particular language and XPCOM to provide access to XPCOM objects from that language, and to let modules written in that language be used as XPCOM objects by all other languages for which there are XPCOM bindings.

More specifically, an XPCOM language binding:

  • Enables access to XPCOM objects from that language (where access means reading/writing/creating XPCOM objects as well as calling methods on them).
  • Exposes modules written in the bound language as XPCOM objects, thereby enabling all other languages for which XPCOM bindings exist to access these modules.

Since the XPCOM layer itself is written in C/C++, its API can be accessed out-of-the-box using C or C++. In order to allow any other language to use the XPCOM API, a bridging layer is required.

The following bridging layers are currently available:

Components.utils.import
Este método fue introducido en Firefox 3 y es usado para compartir código entre diferentes alcances(scopes) de forma sencilla. Por ejemplo, puedes importar XPCOMUtils.jsm para evitar copiar y pegar grandes porciones comunes de código de registración de componentes XPCOM en tus archivos de compomentes.

Etiquetas y colaboradores del documento

 Colaboradores en esta página: Sheppy
 Última actualización por: Sheppy,