XMLHttpRequestEventTarget.onloadstart

The XMLHttpRequestEventTarget.onloadstart is the function called when an XMLHttpRequest transaction starts transferring data.

Syntax

XMLHttpRequest.onloadstart = callback;

Values

  • callback is the function to be called when the transaction begins to transfer data.

Example

var xmlhttp = new XMLHttpRequest(),
  method = 'GET',
  url = 'https://developer.mozilla.org/';

xmlhttp.open(method, url, true);
xmlhttp.onloadstart = function () {
  console.log("Download underway");
};
xmlhttp.send();

Specifications

Specification Status Comment
XMLHttpRequest Living Standard WHATWG living standard

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Edge Mobile ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?

Legend

Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Contributors to this page: rossisi, ExE-Boss, erikadoyle, teoli, rolfedh, Sheppy
Last updated by: rossisi,