[whatwg] SVG extensions to <canvas>

Anne van Kesteren annevk at opera.com
Mon May 4 15:39:38 PDT 2009


On Tue, 05 May 2009 00:16:50 +0200, ddailey <ddailey at zoominternet.net>  
wrote:
> Maybe I misunderstood (or, more precisely, I am about to state my  
> probable misunderstanding):
>
> Does this mean for example, that the author could take a chunk of <svg>  
> code or its equivalent and pass it to canvas.drawImage() (and friends)  
> and then have a raster version in JavaScript of the <svg> ? If so, then  
> would that not allow, client-side, things like interrogating pixel  
> values at point (x,y) within an SVG? That's something I'd like to see. I  
> understand that if done improperly this can yield security problems  
> across domains, but it seems in this case we're only talking one domain.

The SVG fragment could still contain a cross-origin reference of some  
sorts so it does not help with that. It does allow you to create some SVG  
and draw it on a <canvas> without having to first create a data URL or  
some such out of it.


-- 
Anne van Kesteren
http://annevankesteren.nl/



More information about the whatwg mailing list