W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2010

[whatwg] CSS canvas() function

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 23 Nov 2010 16:13:26 -0800
Message-ID: <AANLkTi=FG=xcrFvU1vRtTaL_7kXaXiJFunV55Vy1bcmK@mail.gmail.com>
(This is being sent to the WHATWG list, rather than the CSSWG list, as
it seems like the sort of thing that should be primarily defined in
HTML, with a CSS spec just referring to the HTML definition, like
:active and similar things.)

Webkit has for some time now supported using the -webkit-canvas()
function in CSS anywhere you could use an image
(<http://webkit.org/blog/176/css-canvas-drawing/>, published in April
2008).  The function takes an ident, which can then be used in the
window.getCSSCanvasContext() function in javascript to grab a context
keyed to that ident.  Drawing on that context is then reflected
everywhere on the page that references that canvas.

In essence, this is defining a scriptable paint server, which seems
useful enough that we'd really like it in the platform.

I'm willing to define a canvas() function in the CSS Image Values
specification, but since this relies explicitly on an HTML feature, it
feels like the full definition should exist in the HTML spec.


Received on Tuesday, 23 November 2010 16:13:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:28 UTC