[whatwg] CSS canvas() function

Robert O'Callahan robert at ocallahan.org
Tue Nov 23 17:35:54 PST 2010

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.


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

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.)

"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-0002.htm>

More information about the whatwg mailing list