Re: [dom3core] WRONG_DOCUMENT_ERR

On Dec 7, 2005, at 7:17 AM, Joseph Kesselman wrote:

>
> A point for those who haven't considered it: Before you commit to
> implementing a DOM which does not throw this exception, make VERY  
> sure that
> you understand how you're going to handle both live NodeLists and  
> (if you
> intend to implement them) DOM 2 Events. Both of these require back- 
> channel
> communication amongst the nodes of a document, and thus are good  
> examples
> of why it's hard to make separately-implemented nodes play nicely  
> together.
> Also, as has been pointed out before, consider the HTML DOM (if you're
> implementing that) and/or other DOMs that may be carrying additional
> information or behavior. Generally, you will find that *only* nodes  
> from a
> single document-type-agnostic implementation will work reasonably  
> with each
> other, which makes relaxing this constraint rather less useful than  
> it may
> at first appear. The main advantage, as far as I've ever seen,  
> turns out to
> be saving the cycles needed to maintain and check owning document.
>
> I'd still suggest that folks who need to perform this operation use
> adoptNode.
>

This seems especially compelling if, as apparently reported, IE does  
throw the exception as it should and it is only the legacy of special  
Mozilla js code paths expecting bad behavior we are struggling to  
overcome.

Ray Whitmer

Received on Wednesday, 7 December 2005 15:34:00 UTC