W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2014

[whatwg] Undefined spec about removing node in a range.

From: Yoichi Osato <yoichio@google.com>
Date: Mon, 11 Aug 2014 17:16:43 +0900
Message-ID: <CAAEV3pmaM=7kfpHh8-kyQp_8Q0bu=+pXF4-WHQOT0_Od0YeAwg@mail.gmail.com>
To: WHAT Working Group <whatwg@lists.whatwg.org>
Suppose following DOM tree:
div0
- div1
- div2
- - div3
- div4
- - div5
In addition, range is of start at (div2,0) and end at (div4, 0).

What will happen when we delete a node div2?

http://dom.spec.whatwg.org/#node-is-removed
When we are going to delete a node,
current spec says cases that a range boundary point is a descendant of the
node or a parent of the node.
However it is undefined when a boundary point is the node.

I guess the case 2 and 3 should be:
2. For each range whose start node is a "inclusive" descendant of node, set
its start to (parent, index).
3. For each range whose end node is a "inclusive" descendant of node, set
its end to (parent, index).
Received on Monday, 11 August 2014 08:17:13 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:22 UTC