W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2005

[whatwg] Canvas element

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Wed, 20 Apr 2005 20:35:50 +0200
Message-ID: <4266A106.20906@annevankesteren.nl>
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:

  <object data="logo">
   Company's logo
  </object>

... 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
  <http://annevankesteren.nl/>
Received on Wednesday, 20 April 2005 11:35:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:22 UTC