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:32:27 -0700
Message-ID: <004201bdf2d0$dc50e3d0$2ee044c6@arcot-main>
To: <www-dom@w3.org>
>Note that doing deep clone of Document is a problem in DOM Level 1, since
>you have to change the ownerDocument of all the duplicated nodes or it'll
>throw wrong-document exceptions. In fact, this is the only function still
>"broken" in my implementation -- it's not at all hard to do, I just don't
>like the aesthetics of having this be the one exception to Level 1's
>decision not to support copying data from one document to another.


I sympathize with you position.  I had to add setOwnerDocument to my Node
implementation which propagates down to child nodes and any 'side' nodes
(like attributes).

Best,

Don Park
Received on Thursday, 8 October 1998 11:32:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT