W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2012

[whatwg] ProgressEvents for Images

From: Glenn Maynard <glenn@zewt.org>
Date: Fri, 24 Feb 2012 11:50:09 -0600
Message-ID: <CABirCh_goyN0aeRoaESRsxZScjvzv2zOSs-5Uk0HkZjb2Vs14w@mail.gmail.com>
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

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:40 UTC