W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1998

Re: Document cloneNode

From: Don Park <donpark@quake.net>
Date: Thu, 8 Oct 1998 08:23:34 -0700
Message-ID: <003501bdf2cf$a0c63be0$2ee044c6@arcot-main>
To: <www-dom@w3.org>
>When cloneNode is called for a Document object, what should docType and
>documentElement refer to if the clone is not deep?  My inclination is to
>each to NULL on a shallow clone, and clones of their respective objects in
>deep clone.

I believe your interpretation is correct.  Shallow cloneNode clones the
target node and its attributes but not the child nodes.  Since docType and
documentElement are both possible child nodes of Document, I don't think
they should be cloned.


Don Park
Received on Thursday, 8 October 1998 11:24:02 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:04 UTC