Onze vrijwilligers hebben dit artikel nog niet naar het Nederlands vertaald. Doe mee en help de klus te klaren!
U kunt het artikel ook in het English (US) lezen.

The onloadstart property of the GlobalEventHandlers mixin is an EventHandler representing the code to be called when the loadstart event is raised (when progress has begun on the loading of a resource.)

Syntax

img.onloadstart = funcRef;

Value

funcRef is the handler function to be called when the resource's loadstart event fires.

Examples

HTML content

<img src="myImage.jpg">

JavaScript content

// 'loadstart' fires first, then 'load', then 'loadend'

image.addEventListener('load', function(e) {
  console.log('Image loaded');
});

image.addEventListener('loadstart', function(e) {
  console.log('Image load started');
});

image.addEventListener('loadend', function(e) {
  console.log('Image load finished');
});

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'onloadstart' in that specification.
Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Edge Full support 12Firefox Full support 52IE Full support YesOpera Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Safari Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
WebView Android Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Chrome Android Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Edge Mobile Full support 12Firefox Android Full support 52Opera Android Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Safari iOS Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.
Samsung Internet Android Full support Yes
Notes
Full support Yes
Notes
Notes The loadstart event is not fired on <img> elements.

Legend

Full support  
Full support
See implementation notes.
See implementation notes.

Documentlabels en -medewerkers

Aan deze pagina hebben bijgedragen: fscholz, niklasHagner, Sebastianz, chrisdavidmills
Laatst bijgewerkt door: fscholz,