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:
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)
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).
I’ve not decided if I’ll have time to try to put together a change proposal so no TRACKERREQUEST yet.