Undefined, if the replacing text is empty. The created node:
- This node, if it is not read-only.;
- A new text node of the same type.
- During replacement the EntityReference nodes available in read-only mode can be deleted, only if they do not contain nodes different from the following: EntityReference, Text, CDATASection.