- From: <keshlam@us.ibm.com>
- Date: Thu, 8 Oct 1998 21:53:01 -0400
- To: www-dom@w3.org
As I said, it's not hard to do. I just begrudge adding code to multiple classes in my implementation of the DOM in order to support _only_ the Document.cloneNode operation; it offends my sense of proportion. <grin> The other approach, of course, is to try to guess where DOM Level 2 is going to go in terms of allowing data to be copied from document to document. Past conversation has generally guessed that this would be done by providing a "content clone" -- essentially, a copy constructor -- which uses the DOM's public API to extract data from the source and use it to create corresponding nodes native to this implementation (and anchored in this Document). Implementing Document.cloneNode based on that, rather than doing a special-case clone-and-reparent, is a larger chunk of code and won't run as fast... but on the other hand it's a more general solution, and represents functionality that the DOM is probably going to acquire anyway at some point. ______________________________________ Joe Kesselman / IBM Research Unless stated otherwise, all opinions are solely those of the author.
Received on Thursday, 8 October 1998 21:46:17 UTC