Export (0) Print
Expand All

2.1.2 [DOM Level 2 - Traversal Range] Section 2.6, Deleting Content with a Range


The specification states:

Note that if deletion of a Range leaves adjacent Text nodes, they are not 
automatically merged, and empty Text nodes are not automatically removed. Two Text
 nodes should be joined only if each is the container of one of the boundary-points 
of a Range whose contents are deleted. To merge adjacent Text nodes, or remove 
empty text nodes, the normalize() method on the Node interface should be used.

IE9 Mode, IE10 Mode, IE11 and Edge (beta) Mode (All Versions)

If a Range corresponds to a complete text node and deleteContents() is called, the empty text node is removed from the tree.

© 2015 Microsoft