2.1.3 [DOM Level 2 - Traversal Range] Section 2.12, Range modification under document mutation


The specification states:

 There are two general principles which apply to Ranges under document mutation: The first is that all Ranges in a document will remain valid after any mutation operation and the second is that, as much as possible, all Ranges will select the same portion of the document after any mutation operation.

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

If the boundary points are positioned on the end points of a text node, and if methods such as replaceWholeText or appendData are used to modify the text node, the boundary points after the operation are incorrect. This error occurs because Windows Internet Explorer cannot distinguish between the first position within a text node and the beginning offset of the text node within its parent.