aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/xmlhttprequest/load_event
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2022-02-11 00:58:37 +0000
committerMDN <actions@users.noreply.github.com>2022-02-11 00:58:37 +0000
commit4873c5f1122ac800cf3c916a52df07e05ddc9dcf (patch)
tree0b63e7a2179d77b0b20eac780dba8d8cb35355f4 /files/fr/web/api/xmlhttprequest/load_event
parent633d212cfb9c7a5838f350ff88264e460ef0398e (diff)
downloadtranslated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.tar.gz
translated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.tar.bz2
translated-content-4873c5f1122ac800cf3c916a52df07e05ddc9dcf.zip
[CRON] sync translated content
Diffstat (limited to 'files/fr/web/api/xmlhttprequest/load_event')
-rw-r--r--files/fr/web/api/xmlhttprequest/load_event/index.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/files/fr/web/api/xmlhttprequest/load_event/index.md b/files/fr/web/api/xmlhttprequest/load_event/index.md
new file mode 100644
index 0000000000..8d314127c3
--- /dev/null
+++ b/files/fr/web/api/xmlhttprequest/load_event/index.md
@@ -0,0 +1,41 @@
+---
+title: XMLHttpRequestEventTarget.onload
+slug: Web/API/XMLHttpRequest/load_event
+translation_of: Web/API/XMLHttpRequestEventTarget/onload
+original_slug: Web/API/XMLHttpRequestEventTarget/onload
+---
+{{APIRef("XMLHttpRequest")}}
+
+The **`XMLHttpRequestEventTarget.onload`** is the function called when an {{domxref("XMLHttpRequest")}} transaction completes successfully.
+
+## Syntax
+
+ XMLHttpRequest.onload = callback;
+
+### Values
+
+- `callback` is the function to be executed when the request completes successfully. It receives a {{domxref("ProgressEvent")}} object as its first argument. The value of *this* (i.e. the context) is the same {{domxref("XMLHttpRequest")}} this callback is related to.
+
+## Example
+
+```js
+var xmlhttp = new XMLHttpRequest(),
+ method = 'GET',
+ url = 'https://developer.mozilla.org/';
+
+xmlhttp.open(method, url, true);
+xmlhttp.onload = function () {
+ // Do something with the retrieved data ( found in xmlhttp.response )
+};
+xmlhttp.send();
+```
+
+## Specifications
+
+| Specification | Status | Comment |
+| ------------------------------------------------------------------------ | ------------------------------------ | ---------------------- |
+| {{SpecName('XMLHttpRequest', '#handler-xhr-onload')}} | {{Spec2('XMLHttpRequest')}} | WHATWG living standard |
+
+## Browser compatibility
+
+{{Compat("api.XMLHttpRequestEventTarget.onload")}}