[whatwg] Canvas.cloneNode()

Michael A. Puls II shadow2531 at gmail.com
Sat Nov 14 17:20:32 PST 2009

On Fri, 30 Oct 2009 12:03:46 -0400, OmegaJunior  
<omegajunior at omegajunior.net> wrote:

> Greetings,
> Since Last Call was announced and I just ran into this problem, hereby
> this question:
> If an image is drawn on a Canvas element, and subsequently the
> javascript function cloneNode(true) is executed for that element,
> should the clone include a copy of the source canvas image, or should
> it show an empty space?

I think it'd be cool if the clone showed the image. But, I'm pretty sure  
cloneNode(true) is just supposed to create a new canvas element with the  
same attributes and childNodes as the original. It's not supposed to copy  
everything that's going on with the element being copied.

There are some exceptions with state for certain elements. Perhaps that  
can happen with canvas too.


More information about the whatwg mailing list