goog.dom.selection
Namespace.getEnd(textfield)
Returns the place where the selection ends inside a textarea or a text input
textfield
{Element
}
number
}
.getEndPoints(textfield)
Returns the start and end points of the selection inside a textarea or a text input.
textfield
{Element
}
Array
.<number
>}
.getStart(textfield)
Return the place where the selection starts inside a textarea or a text input
textfield
{Element
}
number
}
.getText(textfield)
Returns the selected text inside a textarea or a text input
textfield
{Element
}
string
}
.setCursorPosition(textfield, pos)
Sets the cursor position within a textfield.
textfield
{Element
}
pos
{number
}
.setEnd(textfield, pos)
Sets the place where the selection should end inside a text area or a text input
textfield
{Element
}
pos
{number
}
.setStart(textfield, pos)
Sets the place where the selection should start inside a textarea or a text input
textfield
{Element
}
pos
{number
}
.setText(textfield, text)
Sets the selected text inside a textarea or a text input
textfield
{Element
}
text
{string
}