aboutsummaryrefslogtreecommitdiff
path: root/files/fr/archive/b2g_os/api/domrequest/index.html
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/archive/b2g_os/api/domrequest/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/fr/archive/b2g_os/api/domrequest/index.html')
-rw-r--r--files/fr/archive/b2g_os/api/domrequest/index.html97
1 files changed, 97 insertions, 0 deletions
diff --git a/files/fr/archive/b2g_os/api/domrequest/index.html b/files/fr/archive/b2g_os/api/domrequest/index.html
new file mode 100644
index 0000000000..6fb4e8f968
--- /dev/null
+++ b/files/fr/archive/b2g_os/api/domrequest/index.html
@@ -0,0 +1,97 @@
+---
+title: DOMRequest
+slug: Archive/B2G_OS/API/DOMRequest
+tags:
+ - DOM
+ - Référence_du_DOM_Gecko
+translation_of: Archive/B2G_OS/API/DOMRequest
+---
+<p>{{ ApiRef() }}</p>
+<p>{{ non-standard_header() }}</p>
+<p>Un objet <code>DOMRequest</code> représente une opération en cours. Il fournit des callbacks qui sont appelés quand l'operation est finit, ainsi qu'une reférence au résultat de l'opération. Une méthode DOM qui initie une opération se poursuivant au cours du temps, retounera un objet <code>DOMRequest</code> que vous pouvez surveiller pour connaitre le déroulement de l'opération</p>
+<h2 id="Attributs">Attributs</h2>
+<dl>
+ <dt>
+ {{ domxref("DOMRequest.onsuccess") }}</dt>
+ <dd>
+ Pour définir un callback à appeler quand l'opération représentée par <code>DOMRequest</code> est terminée</dd>
+ <dt>
+ {{ domxref("DOMRequest.onerror") }}</dt>
+ <dd>
+ Pour définir un callback qui sera appelé si une erreur survient pendant le déroulement de l'opération.</dd>
+ <dt>
+ {{ domxref("DOMRequest.readyState") }}</dt>
+ <dd>
+ Une chaîne de caractère indiquant si l'opération tourne toujours. Sa valeur est soit "<code>done</code>" ou "<code>pending</code>".</dd>
+ <dt>
+ {{ domxref("DOMRequest.result") }}</dt>
+ <dd>
+ Le résultat de l'opération.</dd>
+ <dt>
+ {{ domxref("DOMRequest.error") }}</dt>
+ <dd>
+ Information de l'erreur, si présent.</dd>
+</dl>
+<h2 id="Exemple">Exemple</h2>
+<p>Un exemple de l'utilisation des propriétés <code>onsuccess</code>, <code>onerror</code>, <code>result</code> et <code>error</code> de l'objet <code>DOMRequest</code>.</p>
+<pre class="brush: js">var pending = navigator.mozApps.install(manifestUrl);
+pending.onsuccess = function () {
+  // Enregistre l'objet App renvoyé
+  var appRecord = this.result;
+  alert('Installation réussie !');
+};
+pending.onerror = function () {
+ // Affiche le nom de l'erreur
+  alert('Installation échouée, erreur : ' + this.error.name);
+};
+</pre>
+<h2 id="Compatibilité_des_navigateurs">Compatibilité des navigateurs</h2>
+<p>{{ CompatibilityTable() }}</p>
+<div id="compat-desktop">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonction</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatGeckoDesktop("13.0") }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<div id="compat-mobile">
+ <table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Fonction</th>
+ <th>Android</th>
+ <th>Chrome pour Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Support de base</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatGeckoMobile("13.0") }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ </tr>
+ </tbody>
+ </table>
+</div>
+<h2 id="Spécification">Spécification</h2>
+<p>Ne fait actuellement partie d'aucune spécification</p>