public splitText(offset as Int) as Text throws DOMException:
Splits this Text or CDATA node at a UTF-16 offset.
| Parameter | Description |
|---|---|
offset | UTF-16 boundary; a surrogate pair cannot be split in Klyn. |
The new sibling of the same node type.
tail = document.createTextNode("hello").splitText(2)
assert tail.data == "llo"