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

[whatwg] Canvas.cloneNode()

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Sat, 14 Nov 2009 20:20:32 -0500
Message-ID: <op.u3ewoee01ejg13@sandra-svwliu01>
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.

-- 
Michael
Received on Saturday, 14 November 2009 17:20:32 UTC

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