public replaceData(offset as Int, count as Int, arg as String) as Void throws DOMException:
Replaces a bounded range after validating its offset and count.
| Parameter | Description |
|---|---|
offset | Zero-based UTF-16 offset, including length. |
count | Number of UTF-16 units to replace, clipped at the end. |
arg | Replacement text; null acts as empty text. |
text = document.createTextNode("hello")
text.replaceData(1, 100, "i")
assert text.data == "hi"