getInputSelectionStart function

int? getInputSelectionStart(
  1. dynamic input
)

Implementation

int? getInputSelectionStart(input) {
  assert(isInputElement(input));
  return switch(input) {
    HTMLInputElement _ when input.isA<HTMLInputElement>() => input.selectionStart,
    HTMLTextAreaElement _ when input.isA<HTMLTextAreaElement>() => input.selectionStart,
    _ => null
  };
}