JsTextRangeIE attempt = JsTextRangeIE.create().moveToElementText(parent).collapse(true);
while (child != null) {
// Treat text node children separately
if (DomHelper.isTextNode(child)) {
// Move attempt to end of the text node
int len = child.<Text> cast().getLength();
attempt.move(character, len);
// Test if attempt is now at or past target
if (attempt.compareEndPoints(StartToStart, target) >= 0) {
// Target is in this text node. Compute the offset by creating a new
// text range from target to attempt and measuring the length of the