W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: If insertBefore() of DocumentFragment encounters hierarchy error. ..

From: Don Park <donpark@quake.net>
Date: Thu, 10 Sep 1998 15:12:51 -0700
Message-ID: <006301bddd0a$26a10460$2ee044c6@arcot-main>
To: <www-dom@w3.org>
>(ie, if one of the children of the Fragment is not something that can be
>inserted into the target node)... What's the expected behavior?
>There are three obvious choices:
>1) Insert up to the point where the conflict exists, leave it and anything
>following in the DocumentFragment. Reasonable, trivial to implement. And
>since it's what I'm currently doing, I'm slightly biased toward it.
>2) Scan all the kids before insertion starts, and throw the exception if
>any of them are unacceptable. Reasonable, a bit more overhead but far from
>unacceptable, and arguably a bit more robust.
>3) Copy all the kids which can be copied, leaving only the problem children
>in the DocumentFragment. A bit less reasonable, I think, but also easy to

#2 is least problematic IMHO.

Received on Thursday, 10 September 1998 18:26:31 UTC

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