replaceWholeText on the Text node that contains "bar" with "yo" in argument results in the following: EntityReference, the EntityReference must be removed instead of the read-only nodes. If any EntityReference to be removed has descendants that are not EntityReference, Text, or CDATASection nodes, the replaceWholeText method must fail before performing any modification of the document, raising a DOMException with the code NO_MODIFICATION_ALLOWED_ERR. replaceWholeText on the Text node that contains "bar" fails, because the EntityReference node "ent" contains an Element node which cannot be removed.
@param content The content of the replacing Text node.
@return The Text node created with the specified content.
@exception DOMException NO_MODIFICATION_ALLOWED_ERR: Raised if one of the Text nodes being replaced is readonly.
@since DOM Level 3
| |
| |
| |
| |
| |