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

[whatwg] cloneNode and HTML elements

From: Maciej Stachowiak <mjs@apple.com>
Date: Thu, 10 Sep 2009 04:57:03 -0700
Message-ID: <24949239-961F-4521-B13F-5D22CEFF8432@apple.com>

On Sep 10, 2009, at 2:30 AM, Robert O'Callahan wrote:

> On Thu, Sep 10, 2009 at 8:13 PM, Jonas Sicking <jonas at sicking.cc>  
> wrote:
> My assumption was always the opposite. For example for <input>
> elements we clone the 'value' API attribute, as well as the internal
> has-changed-value bit (used for form field restore when going back to
> a page).
> Looks like Opera and Webkit clone some form control state too (the  
> text of text inputs, at least). Haven't tested IE, but it seems  
> likely that interoperability requires at least some cloning of  
> hidden state, so this does need to be specified somewhere.
> I don't particular care what the spec ends up being. For media  
> elements, cloning some hidden state could be useful, but it is hard  
> to implement.

Indeed, we seem to copy the following things for form controls: value,  
checked state, indeterminate state. We don't seem to do anything  
special for any other elements.

The change to clone form state was made based on this bug report: <https://bugs.webkit.org/show_bug.cgi?id=5177 
 >. The bug report cites Mozilla and IE behavior but does not mention  
a real-world site depending on this, though I would presume there was  

I think this behavior should be specified in HTML5.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090910/cfb936fc/attachment.htm>
Received on Thursday, 10 September 2009 04:57:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC