[whatwg] ProgressEvents for Images

It seems odd that loadend is considered useful enough to be recommended by
Progress Events, but not useful enough to be used here.

As an aside, it's odd that if images are unsupported or disabled, no event
is fired at all ("update the image data", step 4).  That means that if you
do this:

var url = URL.createObjectURL(blob);
img.src = url;
img.onload = img.onerror = function(e) { URL.revokeObjectURL(url); }

the blob will leak a reference if images are disabled.  This seems like a
very easy mistake to make, with no clean workaround...

Glenn Maynard

Received on Friday, 24 February 2012 09:50:09 UTC