[whatwg] Canvas element
Anne van Kesteren
fora at annevankesteren.nl
Wed Apr 20 11:35:50 PDT 2005
Dimitri Glazkov wrote:
> Isn't the main functional value behind the canvas element is the
> rendering context? If so, what is the significance of the canvas
> element itself? Take away the behavior, and you've got yourself
> another SPACER tag.
Not really. Since you know what the element is for it has some
additional semantics. Which can be used I guess one way or another.
> Why not allow creating rendering context on all block-level elements?
> Why does the content have to contain information which block level
> element is meant for drawing?
I'm not sure what you mean here.
> Also, I am having hard time the "fallback content" phrase. IMHO, it's
> not the fallback content, it's _the content_ of the element. The
> rendering context is presentation (hopefully, visual interpretation of
> the content), and so are all functional behaviors that come with it.
No, not really. If you take a simple OBJECT element example:
... then the image itself has more semantics than the fallback content.
It is much more descriptive and shows what is actually meant. The
fallback content can probably never match that, nor should it.
Same goes up for the image you draw for the CANVAS element imho.
> However, if the rendering context is available on all block-level
> elements, you can do some really neat stuff, such as using the content
> of a block-level element as arguments for rendering. For instance, the
> markup of an ordered list of links and images is transformed into an
> image gallery.
Such things are already possible using CSS and XBL. This would be abuse
of the CANVAS element as noted in the beginning of the section.
Anne van Kesteren
More information about the whatwg