aboutsummaryrefslogtreecommitdiff
path: root/files/fr/xpcom/liaisons_de_langage
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/fr/xpcom/liaisons_de_langage
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/xpcom/liaisons_de_langage')
-rw-r--r--files/fr/xpcom/liaisons_de_langage/components.exception/index.html35
-rw-r--r--files/fr/xpcom/liaisons_de_langage/components.id/index.html26
-rw-r--r--files/fr/xpcom/liaisons_de_langage/index.html108
-rw-r--r--files/fr/xpcom/liaisons_de_langage/objet_components/index.html181
4 files changed, 350 insertions, 0 deletions
diff --git a/files/fr/xpcom/liaisons_de_langage/components.exception/index.html b/files/fr/xpcom/liaisons_de_langage/components.exception/index.html
new file mode 100644
index 0000000000..e50af52389
--- /dev/null
+++ b/files/fr/xpcom/liaisons_de_langage/components.exception/index.html
@@ -0,0 +1,35 @@
+---
+title: Components.Exception
+slug: XPCOM/Liaisons_de_langage/Components.Exception
+translation_of: Mozilla/Tech/XPCOM/Language_Bindings/Components.Exception
+---
+<h3 id="Summary" name="Summary">Résumé</h3>
+
+<p><code>Components.Exception </code> est un constructeur JavaScript pour créer des objets nsIXPCException. Ces objets exceptions peuvent être émis lors de l'implémentation des interfaces XPCOM en JavaScript, et ils peuvent fournir de meilleurs diagnostics dans la console d'erreur que la simplement valeur <code>nsresult</code>.</p>
+
+<p>Voir aussi <code><a href="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIXPCException" title="">nsIXPCException</a></code>.</p>
+
+<h3 id="Syntax" name="Syntax">Syntaxe</h3>
+
+<pre class="eval">var exception = [ new ] Components.Exception([ <em>message</em> [, <em>result</em> [, <em>stack</em> [, <em>data</em> ] ] ] ]);
+</pre>
+
+<h3 id="Parameters" name="Parameters">Paramètres</h3>
+
+<dl>
+ <dt><code>message</code></dt>
+ <dd>Une chaîne qui peut être affiché dans la console d'erreur lorsque votre exception.</dd>
+ <dt><code>result</code> </dt>
+ <dd>La valeur<code> nsresult</code> de l'exception, qui par défaut est <code>Components.results.NS_ERROR_FAILURE.</code></dd>
+ <dt><code>stack</code> </dt>
+ <dd>Une pile XPCOM réglée sur l'exception (par défaut à la chaîne de la pile en cours).</dd>
+ <dt><code>data</code> </dt>
+ <dd>toutes les données supplémentaires que vous pouvez stocker, par défaut <code>null</code>.</dd>
+</dl>
+
+<h3 id="Example" name="Example">Exemple</h3>
+
+<pre class="eval">throw Components.Exception("I am throwing an Exception from a Javascript XPCOM component.");
+</pre>
+
+<p></p>
diff --git a/files/fr/xpcom/liaisons_de_langage/components.id/index.html b/files/fr/xpcom/liaisons_de_langage/components.id/index.html
new file mode 100644
index 0000000000..6b9fd7c7cb
--- /dev/null
+++ b/files/fr/xpcom/liaisons_de_langage/components.id/index.html
@@ -0,0 +1,26 @@
+---
+title: Components.ID
+slug: XPCOM/Liaisons_de_langage/Components.ID
+translation_of: Mozilla/Tech/XPCOM/Language_Bindings/Components.ID
+---
+<h3 id="Summary" name="Summary">Résumé</h3>
+
+<p><code>Components.ID </code> est un constructeur qui crée des objets natifs qui sont conformes à l'interface <code><a href="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIJSID" title="">nsIJSID</a></code>.</p>
+
+<h3 id="Syntax" name="Syntax">Syntaxe</h3>
+
+<pre class="eval">var interfaceID = [ new ] Components.ID(iid);
+</pre>
+
+<h3 id="Parameters" name="Parameters">Paramètres</h3>
+
+<dl>
+ <dt><code>iid</code></dt>
+ <dd>Une chaîne de format <code>'{00000000-0000-0000-0000-000000000000}'</code> donnant l'ID de l'interface</dd>
+</dl>
+
+<h3 id="Description" name="Description">Description</h3>
+
+<p><code>Components.ID </code> crée des interfaceID pour une utilisation dans la mise en œuvre des méthodes telles que QueryInterface, getInterfaces, et d'autres méthodes qui prennent des ID d'interface en tant que paramètres.<code><a href="/en/Components.classes" title="/en/Components.classes">Components.classes </a> </code>, <code><a href="/en/Components.classesByID" title="/en/Components.classesByID">Components.classes</a></code>, <code><a href="/en/Components.interfaces" title="/en/Components.interfaces">Components.classesByID</a></code> fournissent à peu près tous les <code>nsIDs</code> qu'a besoin JavaScript. L'exception à cette règle est le cas où un composant est écrit en JavaScript et doit s'inscrire lui-même avec le gestionnaire de composant en utilisant son propre <code>nsID</code> - ID qui ne soit pas déjà enregistré et donc ne figure pas dans <code><a href="/en/Components.classes" title="/en/Components.classes">Components.classes</a></code>.</p>
+
+<p></p>
diff --git a/files/fr/xpcom/liaisons_de_langage/index.html b/files/fr/xpcom/liaisons_de_langage/index.html
new file mode 100644
index 0000000000..71537a6b7c
--- /dev/null
+++ b/files/fr/xpcom/liaisons_de_langage/index.html
@@ -0,0 +1,108 @@
+---
+title: Liaisons de langage
+slug: XPCOM/Liaisons_de_langage
+tags:
+ - XPCOM
+ - 'XPCOM:Liaisons_de_langage'
+translation_of: Mozilla/Tech/XPCOM/Language_Bindings
+---
+<div class="boxed translate-rendered">
+<p>Une Liaison de langage XPCOM est une passerelle entre un langage donné et XPCOM en vue d'atteindre deux objectifs :  </p>
+
+<ul>
+ <li>Permettre l'accès aux objets XPCOM depuis ce langage (où l'accès signifie la lecture/écriture/création d'objets XPCOM, ainsi que l'appel de leurs méthodes).</li>
+ <li>Présenter les modules écrits dans le langage de liaison comme des objets XPCOM, et de ce fait permettre à tout autre langage pour lequel une liaison XPCOM existe d'accéder à ces modules.</li>
+</ul>
+
+<p>Puisque la couche XPCOM est écrite en C/C++, son API peut être employée sans intermédiaire avec les langages C et C++. Pour tous les autres langages désirant accéder à l'API XPCOM, l'utilisation d'une passerelle est nécessaire.</p>
+
+<p> De telles passerelles existent pour différents langages :</p>
+
+<p></p><div class="row topicpage-table">
+ <div class="section"><dl><dl><dt class="landingPageList"><a href="/fr/docs/XPCOM/Liaisons_de_langage/Components.classes">Components.classes</a></dt><dd class="landingPageList"><code>Components.classes </code> est un objet en lecture seule dont les propriétés sont des classes indexées par <a href="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIClassInfo/contractID" title="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIClassInfo/contractID"> ContractID</a>. Sespropriétés mettre en œuvre l'interface <code><a href="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIJSCID" title="">nsIJSCID</a></code>. Chaque objet représente l'une des classes de <a href="/fr/docs/Mozilla/Tech/XPCOM" title="/fr/docs/Mozilla/Tech/XPCOM"> XPCOM </a> qui peuvent être construits ou accessibles en tant que service XPCOM. </dd><dt class="landingPageList"><a href="/fr/docs/XPCOM/Liaisons_de_langage/Components.Constructor">Components.Constructor</a></dt><dd class="landingPageList">Crée une fonction JavaScript qui peut être utilisé pour construire de nouvelles instances de composants XPCOM.</dd><dt class="landingPageList"><a href="/fr/docs/XPCOM/Liaisons_de_langage/Components.Exception">Components.Exception</a></dt><dd class="landingPageList"><code>Components.Exception </code> est un constructeur JavaScript pour créer des objets nsIXPCException. Ces objets exceptions peuvent être émis lors de l'implémentation des interfaces XPCOM en JavaScript, et ils peuvent fournir de meilleurs diagnostics dans la console d'erreur que la simplement valeur <code>nsresult</code>.</dd><dt class="landingPageList"><a href="/fr/docs/XPCOM/Liaisons_de_langage/Components.ID">Components.ID</a></dt><dd class="landingPageList"><code>Components.ID </code> est un constructeur qui crée des objets natifs qui sont conformes à l'interface <code><a href="/fr/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIJSID" title="">nsIJSID</a></code>.</dd><dt class="landingPageList"><a href="/fr/docs/Components.utils">Components.utils</a></dt><dd class="landingPageList"><code>Components.utils</code> est une collection de diverses fonctionnalités utiles à XPConnect. Son interface est définie dans <code><a href="https://dxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl" rel="custom">js/xpconnect/idl/xpccomponents.idl</a></code>. Cet objet a actuellement les membres suivants :</dd><dt class="landingPageList"><a href="/fr/docs/Components.utils.evalInSandbox">Components.utils.evalInSandbox</a></dt><dd class="landingPageList">Il peut arriver que vous vouliez exécuter du code JavaScript avec des droits restreints. Depuis Firefox 1.5 (Gecko 1.8) vous pouvez faire cela en utilisant une API qui permet la création de "bacs à sables" à l'intérieur desquels le code sera interprété avec des droits restreints, comme le code exécuté dans une page web.</dd></dl></dl></div>
+ <div class="section"><dl><dt class="landingPageList"><a href="/fr/docs/Components.utils.import">Components.utils.import</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/fr/docs/Components.utils.reportError">Components.utils.reportError</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/fr/docs/JavaXPCOM">JavaXPCOM</a></dt><dd class="landingPageList"></dd><dt class="landingPageList"><a href="/fr/docs/L">Objet Components</a></dt><dd class="landingPageList">L'objet <code>Components</code> est l'objet au travers duquel les fonctionnalités <a href="/fr/XPConnect" title="fr/XPConnect">XPConnect</a> sont reflétées en <a href="/fr/JavaScript" title="fr/JavaScript">JavaScript</a>. Il s'agit en réalité d'une instance native de l'interface <a href="https://dxr.mozilla.org/mozilla-central/source/js/src/xpconnect/idl/xpccomponents.idl" rel="custom">nsIXPCComponents</a> qui est reflétée en JavaScript comme un objet de niveau global à l'aide d'XPConnect.</dd><dt class="landingPageList"><a href="/fr/docs/XPCOM/Liaisons_de_langage/Objet_Components">Objet Components</a></dt><dd class="landingPageList">L'objet <code>Components</code> est l'objet au travers duquel les fonctionnalités <a href="/fr/XPConnect" title="fr/XPConnect">XPConnect</a> sont reflétées en <a href="/fr/JavaScript" title="fr/JavaScript">JavaScript</a>. Il s'agit en réalité d'une instance native de l'interface <a href="https://dxr.mozilla.org/mozilla-central/source/js/src/xpconnect/idl/xpccomponents.idl" rel="custom">nsIXPCComponents</a> qui est reflétée en JavaScript comme un objet de niveau global à l'aide d'XPConnect.</dd><dt class="landingPageList"><a href="/fr/docs/PyXPCOM">PyXPCOM</a></dt><dd class="landingPageList"><strong>PyXPCOM</strong> permet la communication entre <a class="external" href="http://www.python.org/">Python</a> et <a href="/fr/XPCOM" title="fr/XPCOM">XPCOM</a> de telle façon qu'une application Python puisse accéder à des objets XPCOM, et que XPCOM puisse accéder à des classes Python qui implémentent une interface XPCOM. PyXPCOM est utilisé dans <a href="http://komodoide.com/" title="http://komodoide.com/"> ActiveState Komodo</a>, par exemple.</dd></dl></div>
+ </div><p></p>
+
+<div class="row topicpage-table">
+<div class="section">
+<dl>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.classesByID">Components.classesByID</a></dt>
+ <dd class="landingPageList"><code>Components.classesByID</code> is a read-only object whose properties are classes indexed by <a href="/en/CID" title="en/CID">CID</a>.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.interfaces">Components.interfaces</a></dt>
+ <dd class="landingPageList"><code>Components.interfaces</code> is a read-only object whose properties are interfaces indexed by their names.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.interfacesByID">Components.interfacesByID</a></dt>
+ <dd class="landingPageList"><code>Components.interfacesByID</code> is a read-only array of classes indexed by <a href="/en/IID" title="en/IID">IID</a>.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.isSuccessCode">Components.isSuccessCode</a></dt>
+ <dd class="landingPageList">Determines whether a given XPCOM return code (that is, an <code>nsresult</code> value) indicates the success or failure of an operation, returning <code>true</code> or <code>false</code> respectively.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.lastResult">Components.lastResult</a></dt>
+ <dd class="landingPageList"> </dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.manager">Components.manager</a></dt>
+ <dd class="landingPageList"> </dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.results">Components.results</a></dt>
+ <dd class="landingPageList"><code>Components.results</code> is a read-only object whose properties are the names listed as the first parameters of the macros in <code><a class="external external-icon" href="http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/src/xpc.msg" rel="custom">js/xpconnect/src/xpc.msg</a></code> (also at <a href="/en/Table_Of_Errors" title="Table Of Errors">Table Of Errors</a>), with the value of each corresponding to that constant's value.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.returnCode">Components.returnCode</a></dt>
+ <dd class="landingPageList"> </dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.stack">Components.stack</a></dt>
+ <dd class="landingPageList"><code>Components.stack</code> is a read only property of type <code><a href="/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIStackFrame" title="">nsIStackFrame</a></code> (<a class="external external-icon" href="http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsIException.idl#50" rel="custom">IDL definition</a>) that represents a snapshot of the current JavaScript callstack. This can be used for various diagnostic purposes.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils">Components.utils</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components_object">Components</a>.utils</code> is a collection of various useful XPConnect features. Its interface is defined at <code><a class="external external-icon" href="http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl" rel="custom">js/xpconnect/idl/xpccomponents.idl</a></code>.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.Sandbox">Components.utils.Sandbox</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components.utils" title="/en-US/docs/Components.utils">Components.utils</a>.Sandbox</code> is used to create a sandbox object for use with <a href="/en/Components.utils.evalInSandbox" title="en/Components.utils.evalInSandbox"><code>evalInSandbox()</code></a>.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.cloneInto">Components.utils.cloneInto</a></dt>
+ <dd class="landingPageList">This function provides a safe way to take an object defined in a privileged scope and create a <a href="/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm">structured clone</a> of it in a less-privileged scope. It returns a reference to the clone:</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.createObjectIn">Components.utils.createObjectIn</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components.utils">Components.utils</a>.createObjectIn</code> creates a new JavaScript object in the scope of the specified object's compartment.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.evalInSandbox">Components.utils.evalInSandbox</a></dt>
+ <dd class="landingPageList">The <code>evalInSandbox()</code> function enables you to evaluate JavaScript code inside a sandbox you've previously created using the <code><a href="/en/Components.utils.Sandbox" title="en/Components.utils.Sandbox">Components.utils.Sandbox</a></code> constructor.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.evalInWindow">Components.utils.evalInWindow</a></dt>
+ <dd class="landingPageList">This function enables code running in a more-privileged JavaScript context to evaluate a string in a less-privileged JavaScript context. The result is <a href="/en-US/docs/Web/Guide/API/DOM/The_structured_clone_algorithm">structured cloned</a> back to the original context, unless it is native (for example, if it returns a DOM node, this is not structured cloned, because the original context will see that through an <a href="/en-US/docs/XPCNativeWrapper">XrayWrapper</a> already), so it's guaranteed to behave predictably.<br>
+ <br>
+ This is useful for privileged code, such as add-on code, to access variables and APIs defined in web content.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction">Components.utils.exportFunction</a></dt>
+ <dd class="landingPageList">This function provides a safe way to expose a function from a privileged scope to a less-privileged scope. In this way privileged code, such as an add-on, can share code with less-privileged code like a normal web page script. A function exported from privileged to less-privileged code can be called from the less privileged code's context.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.forceGC">Components.utils.forceGC</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components.utils">Components.utils</a>.forceGC</code> lets scripts force a garbage collection cycle. The Mozilla JavaScript engine will perform garbage collection automatically when the JavaScript heap grows beyond a certain size. This mechanism doesn't account for any native (C++) XPCOM objects hanging off JavaScript objects though. In many cases a JavaScript application will have internal knowledge of JavaScript objects referencing large (trees of) XPCOM objects and know when they are no longer reachable. In this case it can be important to be able to force a garbage collection cycle from JavaScript.</dd>
+</dl>
+
+<dl>
+</dl>
+</div>
+
+<div class="section">
+<dl>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.getGlobalForObject">Components.utils.getGlobalForObject</a></dt>
+ <dd class="landingPageList">This method is used to determine the global object with which an object is associated. This is the global object in place at the time the object was created, which is to say the global object used when executing the script that created the object.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.getWeakReference">Components.utils.getWeakReference</a></dt>
+ <dd class="landingPageList">This method was introduced in <a href="/en/Firefox_3_for_developers" title="en/Firefox_3_for_developers">Firefox 3</a> and is used for obtaining a weak reference for an object. To obtain the object reference, you have to call <code>get()</code> on the resulting object.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.import">Components.utils.import</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components.utils">Components.utils</a>.import</code> was introduced in <a href="/en/Firefox_3_for_developers" title="en/Firefox_3_for_developers">Firefox 3</a> and is used for sharing code between different scopes easily. For example, you can import <a href="/en/JavaScript_code_modules/XPCOMUtils.jsm" title="en/XPCOMUtils.jsm">XPCOMUtils.jsm</a> to avoid copy/pasting long XPCOM component registration boilerplate in your component files.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.importGlobalProperties">Components.utils.importGlobalProperties</a></dt>
+ <dd class="landingPageList">Imports various objects into a system scope.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.isXrayWrapper">Components.utils.isXrayWrapper</a></dt>
+ <dd class="landingPageList">When privileged JavaScript in Gecko accesses objects belonging to less-privileged code (such as untrusted web content), it does so, by default, with "<a href="/en-US/docs/Xray_vision">Xray vision</a>": a mechanism that filters out certain changes to the objects that could cause them to behave in unexpected ways. For example, privileged code using an Xray to a DOM object sees only  the original, native version of the DOM object. Any <a href="/en-US/docs/Glossary/Expando">expando</a> properties are not visible, and if any native properties have been redefined, this has no effect.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.makeObjectPropsNormal">Components.utils.makeObjectPropsNormal</a></dt>
+ <dd class="landingPageList">Ensures that the specified object's methods are all in the object's scope, and aren't cross-component wrappers.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.reportError">Components.utils.reportError</a></dt>
+ <dd class="landingPageList"><code>Components.utils.reportError</code> reports a JavaScript Error object to the <a href="/en/Error_Console" title="en/Error_Console">Error Console</a>, and returns. It is meant for use by extension developers who have exception handler blocks which want to "eat" an exception, but still want to report it to the console.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.schedulePreciseGC">Components.utils.schedulePreciseGC</a></dt>
+ <dd class="landingPageList">This method lets scripts schedule a garbage collection cycle. The garbage collection cycle will occur sometime in the future, when no JavaScript code is executing. This is useful particularly when testing for memory leaks, because normal garbage collection is conservative when JavaScript code is running to ensure that in-use memory isn't inadvertently collected.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.setGCZeal">Components.utils.setGCZeal</a></dt>
+ <dd class="landingPageList">This method lets scripts set the zeal level for garbage collection. You can get details on what this method does in <a href="/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_SetGCZeal" title="JS_SetGCZeal sets the level of additional garbage collection to perform for a runtime, for the purpose of finding or reproducing bugs."><code>JS_SetGCZeal</code></a>. This method calls through to that thusly:</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.unload">Components.utils.unload</a></dt>
+ <dd class="landingPageList"><code><a href="/en-US/docs/Components.utils">Components.utils</a>.unload</code> was introduced in <a href="/en/Firefox_7_for_developers" title="en/Firefox_7_for_developers">Firefox 7</a> and is used to unload <a href="/en/JavaScript_code_modules" title="en/JavaScript code modules">JavaScript code modules</a>. This can be particularly handy with <a href="/en/Extensions/Bootstrapped_extensions" title="en/Extensions/Bootstrapped_extensions">restartless (boostrapped) extensions</a>, so that you can unload an old version of a code module when a new version of your add-on is installed.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.unwaiveXrays">Components.utils.unwaiveXrays</a></dt>
+ <dd class="landingPageList">Undo a previous call to <a href="/en-US/docs/Components.utils.waiveXrays"><code>Components.utils.waiveXrays()</code></a>, restoring <a href="/en-US/docs/Xray_vision">Xray vision</a> for the caller.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.waiveXrays">Components.utils.waiveXrays</a></dt>
+ <dd class="landingPageList">Waives <a href="/en-US/docs/Xray_vision">Xray vision</a> for an object, giving the caller a transparent wrapper to the underlying object.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/JavaXPCOM">JavaXPCOM</a></dt>
+ <dd class="landingPageList"><strong>JavaXPCOM</strong> allows for communication between Java and <a href="/en-US/docs/XPCOM" title="XPCOM">XPCOM</a>, such that a Java application can access XPCOM objects, and XPCOM can access any Java class that implements an XPCOM interface. JavaXPCOM is not actively maintained.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/PlXPCOM">PlXPCOM</a></dt>
+ <dd class="landingPageList">plXPCOM (Perl XPCOM) provides language bindings letting you use <a href="/en-US/docs/Mozilla/Tech/XPCOM">XPCOM</a> from <a class="external external-icon" href="http://www.perl.org/">Perl</a> code. The resources here provide information about this language binding and how to use it.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/RbXPCOM">RbXPCOM</a></dt>
+ <dd class="landingPageList">RbXPCOM (Ruby Cross-Platform COM) provides bindings between the popular <a class="external external-icon" href="https://www.ruby-lang.org/">Ruby</a> programming language and <a href="/en-US/docs/Mozilla/Tech/XPCOM">XPCOM</a>. You can find additional information using the resource links below.</dd>
+ <dt class="landingPageList"><a href="/en-US/docs/Mozilla/Tech/XPCOM/Language_bindings/XPConnect">XPConnect</a></dt>
+ <dd class="landingPageList">XPConnect is a bridge between <a href="/en-US/docs/Web/JavaScript">JavaScript</a> and <a href="/en-US/docs/Mozilla/Tech/XPCOM">XPCOM</a>. With XPConnect, you can use XPCOM components from JavaScript code, and interact with JavaScript objects from within XPCOM components. XPConnect is part of <a href="/en-US/Firefox">Firefox</a> and is actively used in <a href="/en-US/docs/Mozilla/Tech/XUL">XUL</a> applications.</dd>
+</dl>
+</div>
+</div>
+</div>
diff --git a/files/fr/xpcom/liaisons_de_langage/objet_components/index.html b/files/fr/xpcom/liaisons_de_langage/objet_components/index.html
new file mode 100644
index 0000000000..6389b3393d
--- /dev/null
+++ b/files/fr/xpcom/liaisons_de_langage/objet_components/index.html
@@ -0,0 +1,181 @@
+---
+title: Objet Components
+slug: XPCOM/Liaisons_de_langage/Objet_Components
+---
+<p>L'objet <code>Components</code> est l'objet au travers duquel les fonctionnalités <a href="/fr/XPConnect" title="fr/XPConnect">XPConnect</a> sont reflétées en <a href="/fr/JavaScript" title="fr/JavaScript">JavaScript</a>. Il s'agit en réalité d'une instance native de l'interface <a href="https://dxr.mozilla.org/mozilla-central/source/js/src/xpconnect/idl/xpccomponents.idl" rel="custom">nsIXPCComponents</a> qui est reflétée en JavaScript comme un objet de niveau global à l'aide d'XPConnect.</p>
+
+<p>Certaines propriétés de <code>Components</code> ont besoin de privilèges élevés et peuvent ne pas fonctionner dans des pages Web.</p>
+
+<p>L'objet <code>Components</code> dispose des membres suivants :</p>
+
+<table class="fullwidth-table">
+ <tbody>
+ <tr>
+ <th>Membre</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.classes" title="fr/Components.classes">classes</a></code></td>
+ <td>tableau de classes par ContractID</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.classesByID" title="fr/Components.classesByID">classesByID</a></code></td>
+ <td>tableau de classes par CID</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.Constructor" title="fr/Components.Constructor">Constructor</a></code></td>
+ <td>constructeur de constructeur de composants</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.Exception" title="fr/Components.Exception">Exception</a></code></td>
+ <td>constructeur d'exception XPConnect</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.ID" title="fr/Components.ID">ID</a></code></td>
+ <td>constructeur de nsID XPCOM</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.interfaces" title="fr/Components.interfaces">interfaces</a></code></td>
+ <td>tableau d'interfaces par nom d'interface</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.interfacesByID" title="fr/Components.interfacesByID">interfacesByID</a></code></td>
+ <td>tableau d'interfaces par IID</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.isSuccessCode" title="fr/Components.isSuccessCode">isSuccessCode</a></code></td>
+ <td>fonction pour déterminer si un résultat donné est un code de réussite</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.lastResult" title="fr/Components.lastResult">lastResult</a></code></td>
+ <td>code de résultat de l'appel XPConnect le plus récent</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.manager" title="fr/Components.manager">manager</a></code></td>
+ <td>le gestionnaire global de composants XPCOM</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.results" title="fr/Components.results">results</a></code></td>
+ <td>tableau des codes de résultats connus par nom</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.returnCode" title="fr/Components.returnCode">returnCode</a></code></td>
+ <td>résultat en attente pour l'appel courant</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.stack" title="fr/Components.stack">stack</a></code></td>
+ <td>pile d'appels JavaScript courante</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils" title="fr/Components.utils">utils</a></code></td>
+ <td>donne accès à différentes fonctionnalités utiles</td>
+ </tr>
+ <tr>
+ <td><code><a href="/Fr/Components.utils.evalInSandbox" title="Fr/Components.utils.evalInSandbox">utils.evalInSandbox</a></code></td>
+ <td>Lance du code JavaScript dans une sandbox, généralement pour lancer du code à privilèges restreints.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.forceGC" title="fr/Components.utils.forceGC">utils.forceGC</a></code></td>
+ <td> Force un cycle de garbage collection.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.getWeakReference" title="fr/Components.utils.getWeakReference">utils.getWeakReference</a></code></td>
+ <td> Obtient une référence faible à l'objet passé.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.import" title="fr/Components.utils.import">utils.import</a></code></td>
+ <td> Charge un module JS dans le script courant, sans partager de visibilité.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.lookupMethod" title="fr/Components.utils.lookupMethod">utils.lookupMethod</a></code></td>
+ <td>Examine une méthode ou propriété native (c'est-à-dire déclaré dans l'interface) d'un objet XPCOM. Sert à la même chose que <a href="/fr/XPCNativeWrapper" title="fr/XPCNativeWrapper">XPCNativeWrapper</a>.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.reportError" title="fr/Components.utils.reportError">utils.reportError</a></code></td>
+ <td>Rapporte un objet d'erreur JavaScript dans la <a href="/fr/Console_d'erreurs" title="fr/Console_d'erreurs">Console d'erreurs</a>.</td>
+ </tr>
+ <tr>
+ <td><code><a href="/fr/Components.utils.Sandbox" title="fr/Components.utils.Sandbox">utils.Sandbox</a></code></td>
+ <td>
+ <p>Crée des objets de sandbox pout utiliser avec <code>evalInSandbox</code>.</p>
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<p> </p>
+
+<dl>
+ <dd> </dd>
+ <dt><code><a href="/en/Components.utils" title="en/Components.utils">utils</a></code></dt>
+ <dd>provides access to several useful features</dd>
+ <dd>
+ <dl>
+ <dt><code>utils.atline</code> </dt>
+ <dd>Provides access to the value of the <code>atline</code> property in the JavaScript environment.</dd>
+ <dt><a href="/en/Components.utils.createObjectIn" title="en/Components.utils.createObjectIn"><code>utils.createObjectIn</code></a> </dt>
+ <dd>Creates a new object in the scope of the specified object's compartment. May only be called from JavaScript code.</dd>
+ <dt><code><a href="/en/Components.utils.evalInSandbox" title="en/Components.utils.evalInSandbox">utils.evalInSandbox</a></code></dt>
+ <dd>Runs JavaScript code in a sandbox, usually used to run code with restricted privileges.</dd>
+ <dt><code><a href="/en/Components.utils.forceGC" title="en/Components.utils.forceGC">utils.forceGC</a></code> </dt>
+ <dd>Forces a garbage collection cycle.</dd>
+ <dt><code><a href="/en/Components.utils.getGlobalForObject" title="en/Components.utils.getGlobalForObject">utils.getGlobalForObject</a></code> </dt>
+ <dd>Returns the global object with which a given object is associated (through its prototype chain at birth, for example).</dd>
+ <dt><code><a href="/en/Components.utils.getWeakReference" title="en/Components.utils.getWeakReference">utils.getWeakReference</a></code> </dt>
+ <dd>Gets a weak reference for the object passed in.</dd>
+ <dt><code><a href="/en/Components.utils.import" title="en/Components.utils.import">utils.import</a></code> </dt>
+ <dd>Loads a JavaScript module into the current script, without sharing a scope.</dd>
+ <dt><code><a href="/en/Components.utils.lookupMethod" title="en/Components.utils.lookupMethod">utils.lookupMethod</a></code></dt>
+ <dd>Looks up a native (i.e. declared in the interface) method or property of an XPCOM object. Serves the same purpose as <a href="/en/XPCNativeWrapper" title="en/XPCNativeWrapper">XPCNativeWrapper</a>.</dd>
+ <dt><a href="/en/Components.utils.makeObjectPropsNormal" title="en/Components.utils.makeObjectPropsNormal">utils.makeObjectPropsNormal</a> </dt>
+ <dd>Ensures that all functions come from the specified object's scope, and aren't cross-compartment wrappers. May only be called from JavaScript code.</dd>
+ </dl>
+
+ <dl>
+ <dt><code>utils.methodjit</code> <span class="inlineIndicator obsolete obsoleteInline" title="(Firefox 24.0 / Thunderbird 24.0 / SeaMonkey 2.21)">Obsolète depuis Gecko 24.0</span></dt>
+ <dd>Provides access to the value of the <code>methodjit</code> property in the JavaScript environment.</dd>
+ </dl>
+
+ <dl>
+ <dt><code>utils.methodjit_always</code> <span class="inlineIndicator obsolete obsoleteInline" title="(Firefox 24.0 / Thunderbird 24.0 / SeaMonkey 2.21)">Obsolète depuis Gecko 24.0</span></dt>
+ <dd>Provides access to the value of the <code>methodjit_always</code> property in the JavaScript environment.</dd>
+ </dl>
+
+ <dl>
+ <dt><code>utils.relimit</code> </dt>
+ <dd>Provides access to the value of the <code>relimit</code> property in the JavaScript environment.</dd>
+ </dl>
+
+ <dl>
+ <dt><code><a href="/en/Components.utils.reportError" title="en/Components.utils.reportError">utils.reportError</a></code></dt>
+ <dd>Reports a JavaScript Error object to the <a href="/en/Error_Console" title="en/Error_Console">Error Console</a>.</dd>
+ <dt><a href="/en/Components.utils.schedulePreciseGC" title="en/Components.utils.schedulePreciseGC"><code>utils.schedulePreciseGC</code></a> </dt>
+ <dd>Requests that garbage collection occur sometime in the future when no JavaScript code is running; accepts a callback function to receive notification once collection is complete.</dd>
+ <dt><code><a href="/en/Components.utils.setGCZeal" title="Components.utils.setGCZeal">utils.setGCZeal()</a></code> </dt>
+ <dd>Sets the GC zeal level for the context.</dd>
+ </dl>
+
+ <dl>
+ <dt><code>utils.strict</code> </dt>
+ <dd>Provides access to the value of the <code>strict</code> property in the JavaScript environment.</dd>
+ </dl>
+
+ <dl>
+ <dt><code>utils.werror</code> </dt>
+ <dd>Provides access to the value of the <code>werror</code> property in the JavaScript environment.</dd>
+ </dl>
+
+ <dl>
+ <dt><code><a href="/en/Components.utils.Sandbox" title="en/Components.utils.Sandbox">utils.Sandbox</a></code></dt>
+ <dd>Creates sandbox objects for use with <code>evalInSandbox</code>.</dd>
+ <dt><code>utils.xml</code> </dt>
+ <dd>Provides access to the value of the <code>xml</code> property in the JavaScript environment.</dd>
+ </dl>
+ </dd>
+</dl>
+
+<p> </p>
+
+<p> </p>
+
+<p><a href="https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components_object">Components object (en)</a></p>