[whatwg] CSS canvas() function

On Wed, Nov 24, 2010 at 2:23 PM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:

> For example, I've recently been playing with fractals in canvas, and
> temporarily set my blog to have a screen-filling canvas z-index'd
> below the content, filled with an interactive fractal (the mandelbrot
> set, overlaid with the julia set for the point your mouse was over).
> It would be better/cleaner/easier/more semantic to just draw directly
> into the <body> background, which is what I was faking with abspos and
> z-index.
>

OK.

How about just using canvas() to refer to setImageElement() things?
>
This retains the flexibility that setImageElement has over
> getCSSCanvasContext, while removing the weirdness of transparently
> overriding #ids and keeping element() open to accept arbitrary
> selectors?
>

Special syntax to refer to setImageElement elements would be OK, but I
wouldn't choose "canvas()", since the element can also be a <video> or
<img>.

How about element(<ident>) to refer to setImageElements, element(#id) for
DOM IDs, and element(first(<selector>)) for selectors? (I don't necessarily
endorse the idea of extending to selectors, FWIW, but I appreciate the
desire to keep the possibility open.)

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101124/507f2af2/attachment.htm>

Received on Tuesday, 23 November 2010 17:35:54 UTC