This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
When the script that is responsible for drawing something onto a canvas element fails to load (unable to download the file or syntax error) the fallback for that canvas element is not activated. The specification only seems to cover how fallback content should be handled when scripting is completely disabled and when the canvas element is unsupported. That the fallback content on the canvas element isn’t activated when the script cannot be downloaded is also inconsistent with how fallback content is handled on the img element. If the image associated with the img element cannot be downloaded, the fallback is activated. Is there a need to have an more explicit relationship between the drawing method and the canvas element so failures like this can be detected?
I'll take this one.
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the Editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the Tracker Issue; or you may create a Tracker Issue yourself, if you are able to do so. For more details, see this document: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Rejected Change Description: No change. Rationale: <canvas> is simply an image whose contents may be changed programmatically. Whether or not script ever actually does so (and why) is irrelevant.
No, if that was the case it would be possible to load the initial image using for example a src attribute that a script could change later (and if that image fails to load the fallback would be activated). Nothing will be drawn on the canvas element without a script which means that the canvas element is not usable without that script (could of course be spread over several javascript files) and because of that the fallback needs to be activated. Why not try to avoid situations when the canvas element has no content at all (because of errors) and there is fallback content that is hidden? I’ve not decided if I’ll have time to try to put together a change proposal so no TRACKERREQUEST yet.