이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 참여해서 번역을 마치도록 도와 주세요!
English (US)의 문서도 읽어보세요.

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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes11252 Yes Yes1 Yes1
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support Yes1 Yes11252 Yes1 Yes1 Yes1

1. The loadstart event is not fired on <img> elements.

문서 태그 및 공헌자

이 페이지의 공헌자: fscholz, niklasHagner, Sebastianz, chrisdavidmills
최종 변경자: fscholz,