W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000


From: Jonas Sicking <sicking@bigfoot.com>
Date: Thu, 1 Jun 2000 04:27:21 +0200
Message-ID: <028801bfcb70$eaf71420$3110f7d4@Milwork08>
To: <www-dom@w3.org>

DOM2 CR section 8.10 [1] says that if you apply the surroundContents method
to the following range (stars marking range start and end):


An exception should be thrown.
However, if you follow the steps described a bit further up in the same
section you would get the following DOM tree:


Which I think is the most useful result. Is there a reason that an exception
should be thrown?

Also, the CR says that all children of the new node should be deleted before
the node is inserted. Couldn't it be useful to allow attribute nodes to
remain.  In other words allowing operations like:

<FOO>*<BAR a="b">ABC</BAR>*</FOO>

[1] http://www.w3.org/TR/DOM-Level-2/range.html#Level-2-Range-Surrounding

/ Jonas Sicking
Received on Wednesday, 31 May 2000 22:26:43 UTC

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