From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/fr/web/api/xmldocument/async/index.html | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 files/fr/web/api/xmldocument/async/index.html (limited to 'files/fr/web/api/xmldocument/async/index.html') diff --git a/files/fr/web/api/xmldocument/async/index.html b/files/fr/web/api/xmldocument/async/index.html new file mode 100644 index 0000000000..436e3e5215 --- /dev/null +++ b/files/fr/web/api/xmldocument/async/index.html @@ -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 +--- +

{{APIRef("DOM")}}{{Deprecated_header}} {{Non-standard_header}}

+ +

document.async peut être défini pour indiquer si un appel {{domxref("document.load")}} doit être une requête asynchrone ou synchrone. true (vrai) est la valeur par défaut, indiquant que les documents doivent être chargés de façon asynchrone.

+ +

(Il a été possible de charger des documents de manière synchrone depuis 1.4 alpha.)

+ +

Exemple

+ +
function loadXMLData(e) {
+  alert(new XMLSerializer().serializeToString(e.target)); // Donne le contenu querydata.xml sous forme "string" (chaîne de caractère)
+}
+
+var xmlDoc = document.implementation.createDocument("", "test", null);
+
+xmlDoc.async = false;
+xmlDoc.onload = loadXMLData;
+xmlDoc.load('querydata.xml');
+ +

Spécification

+ + + +

Voir aussi

+ + -- cgit v1.2.3-54-g00ecf