Re: Document cloneNode

Agreed, a shallow clone of a node should't copy any of the children,
including the children which have specialized accessor methods... so
shallow clone of Document shoul have null docType and documentElement.

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.

______________________________________
Joe Kesselman  / IBM Research
Unless stated otherwise, all opinions are solely those of the author.

Received on Thursday, 8 October 1998 11:20:50 UTC