XMLHttpRequestEventTarget
XMLHttpRequestEventTarget is the interface that describes the event handlers you can implement in an object that will handle events for an XMLHttpRequest.
Properties
XMLHttpRequestEventTarget.onabort-
Contains the function to call when a request is aborted and the
abortevent is received by this object. XMLHttpRequestEventTarget.onerror-
Contains the function to call when a request encounters an error and the
errorevent is received by this object. XMLHttpRequestEventTarget.onload-
Contains the function to call when an HTTP request returns after successfully fetching content and the
loadevent is received by this object. XMLHttpRequestEventTarget.onloadstart-
Contains the function that gets called when the HTTP request first begins loading data and the
loadstartevent is received by this object. XMLHttpRequestEventTarget.onprogress-
Contains the function that is called periodically with information about the progress of the request and the
progressevent is received by this object. XMLHttpRequestEventTarget.ontimeout-
Contains the function that is called if the event times out and the
timeoutevent is received by this object; this only happens if a timeout has been previously established by setting the value of theXMLHttpRequestobject'stimeoutattribute. XMLHttpRequestEventTarget.onloadend-
Contains the function that is called when the load is completed, even if the request failed, and the
loadendevent is received by this object.
Specifications
Browser compatibility
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
XMLHttpRequestEventTarget |
1 |
12 |
1 |
7 |
≤12.1 |
1 |
1 |
18 |
4 |
≤12.1 |
1 |
1.0 |
onabort |
1 |
12 |
3.5 |
10 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
onerror |
1 |
12 |
1 |
10 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
onload |
1 |
12 |
1 |
10 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
onloadend |
18 |
12 |
5 |
10 |
≤12.1 |
6 |
≤37 |
18 |
5 |
≤12.1 |
6 |
1.0 |
onloadstart |
1 |
12 |
3.5 |
10 |
≤12.1 |
≤4 |
1 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
onprogress |
1 |
12 |
1 |
10 |
≤12.1 |
≤4 |
≤37 |
18 |
4 |
≤12.1 |
≤3 |
1.0 |
ontimeout |
29 |
12 |
12 |
8 |
16 |
7 |
≤37 |
29 |
14 |
16 |
7 |
1.0 |
See also
© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequestEventTarget