<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for loadstart, progress, and loadend ProgressEvents to the IMG tag."
href="https://bugs.webkit.org/show_bug.cgi?id=76102#c15">Comment # 15</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add support for loadstart, progress, and loadend ProgressEvents to the IMG tag."
href="https://bugs.webkit.org/show_bug.cgi?id=76102">bug 76102</a>
from <span class="vcard"><a class="email" href="mailto:zcorpan@gmail.com" title="Simon Pieters <zcorpan@gmail.com>"> <span class="fn">Simon Pieters</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=76102#c14">comment #14</a>)
<span class="quote">> Yes it is part of the WHATWG HTML Living Standard specs. Search for
> "loadstart" in
> <a href="http://www.whatwg.org/specs/web-apps/current-work/#the-img-element">http://www.whatwg.org/specs/web-apps/current-work/#the-img-element</a>.</span >
That algorithm is not run "eg. on orientation change". Then this algorithm is run instead <a href="https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes">https://html.spec.whatwg.org/multipage/embedded-content.html#img-environment-changes</a> and it does not fire loadstart/progress.
<span class="quote">> I think there is no other way of detecting that a (specific) image starts
> being loaded by the browser. That can be useful for displaying loading
> indications.</span >
Why would you want a loading indicator for environment changes instead of just swapping the image when it is loaded?
<span class="quote">> I find it especially interesting when using the <picture> element. By using
> <picture>, the src of an <img> tag can change after the page finished
> loading, eg. on a viewport resize or an orientation change. That results in
> a blank/white image for the time the images is actually being loaded - with
> a loadstart event you could let the user know about the loading, eg. by
> showing a loading indicator.</span >
No, the old image would keep showing until the new one is completely loaded, per spec.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>