[whatwg] cloneNode and HTML elements

On Sep 9, 2009, at 10:26 PM, Robert O'Callahan wrote:

> If you call cloneNode on a media element, the state of the resulting  
> media element seems unspecified. Should it be playing the same media  
> resource at the same current time as the original?
> Similar questions arise when you clone form elements; is the state  
> that's not visible in the DOM cloned?
> Who should be responsible for defining this?

Does cloneNode require copying any state besides an element's  
qualified name, attributes and DOM children? The definition in  
DOM3Core doesn't say anything else should be copied. Is form control  
state (such as set of items selected in a <list multiple>) copied?

Reference for cloneNode:

My assumption based on the spec is that no element-specific internal  
state should be copied, the cloning should only be DOM-wise.


Received on Thursday, 10 September 2009 00:41:30 UTC