[whatwg] document.readyState and its initial value

Jonas Sicking jonas at sicking.cc
Tue Aug 5 08:26:38 PDT 2008


>> 2. How can we listen to the onreadystatechange, if we want to trigger an 
>> event when the object starts loading? It will not change readystate 
>> since it was already in the state loading.
> 
> In HTML5 there's no way to get an event when an <img> begins loading. It 
> begins loading when the src="" is set.

Nothing prevents an implementation from firing ProgressEvents while 
loading images though, that would give you an event when an image starts 
loading.

I don't think any browser does that as of yet though.

/ Jonas




More information about the whatwg mailing list