[whatwg] Unnecessary loading of fallback content in canvas element

Charles Pritchard chuck at jumis.com
Sat Jan 8 14:45:17 PST 2011

Date: Sat, 08 Jan 2011 17:41:33 +0100
From: Benjamin Poulain <benjamin.poulain at nokia.com>
Subject: Re: [whatwg] Unnecessary loading of fallback content in
   canvas    element

On 01/08/2011 12:57 AM, ext Charles Pritchard wrote:
> Let me know if this has been discussed before:
> Loading an html page containing:
> <canvas><img src="fallback.jpg" /></canvas>
> loads the fallback.jpg image, even when canvas is supported.
> Is this intentional, or simply the easiest route for the moment?

I would say that is the indented behavior.


For example:
"When a canvas element represents embedded content, the user can still 
focus descendants of the canvas element (in the fallback content)."

Since the content is available, I think it is normal for it to follow 
the normal behavior.



My point was that the resources are requested, instead of aborted. Yes, the elements should be in the DOM and focusable (and I've opened a webkit bug for that) -- my point is that an img tag should not spawn a network request during page load, for the fallback content unnecessarily.

After page load, it makes sense for img and iframe; as injected by scripting; prior to that, it seems wasteful, it seems that img.abort() should be called.

More information about the whatwg mailing list