aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/xmldocument/async/index.md
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/xmldocument/async/index.md')
-rw-r--r--files/fr/web/api/xmldocument/async/index.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/files/fr/web/api/xmldocument/async/index.md b/files/fr/web/api/xmldocument/async/index.md
new file mode 100644
index 0000000000..d9f8142761
--- /dev/null
+++ b/files/fr/web/api/xmldocument/async/index.md
@@ -0,0 +1,42 @@
+---
+title: Document.async
+slug: Web/API/XMLDocument/async
+tags:
+ - API
+ - Asynchrone
+ - DOM
+ - Document
+ - Propriété
+ - XML
+translation_of: Web/API/XMLDocument/async
+---
+<p>{{APIRef("DOM")}}{{Deprecated_header}} {{Non-standard_header}}</p>
+
+<p><code>document.async</code> peut être défini pour indiquer si un appel {{domxref("document.load")}} doit être une requête asynchrone ou synchrone. <code>true</code> (<em>vrai</em>) est la valeur par défaut, indiquant que les documents doivent être chargés de façon asynchrone.</p>
+
+<p>(Il a été possible de charger des documents de manière synchrone depuis 1.4 alpha.)</p>
+
+<h2 id="Exemple">Exemple</h2>
+
+<pre class="brush:js">function loadXMLData(e) {
+ alert(new XMLSerializer().serializeToString(e.target)); // Donne le contenu querydata.xml sous forme "string" (<em>chaîne de caractère</em>)
+}
+
+var xmlDoc = document.implementation.createDocument("", "test", null);
+
+xmlDoc.async = false;
+xmlDoc.onload = loadXMLData;
+xmlDoc.load('querydata.xml');</pre>
+
+<h2 id="Specification">Spécification</h2>
+
+<ul>
+ <li><a href="http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS">DOM Level 3 Load &amp; Save module</a></li>
+</ul>
+
+<h2 id="Voir_aussi">Voir aussi</h2>
+
+<ul>
+ <li><a href="/fr/docs/XML_dans_Mozilla">XML in Mozilla</a></li>
+ <li>{{domxref("document.load")}}</li>
+</ul>