setSelectionRange function
Implementation
void setSelectionRange(input, int start, int end) {
assert(isInputElement(input));
if (input is HTMLInputElement && input.isA<HTMLInputElement>())
input.setSelectionRange(start, end);
else if (input is HTMLTextAreaElement && input.isA<HTMLTextAreaElement>())
input.setSelectionRange(start, end);
}