getInputSelectionEnd function

int? getInputSelectionEnd(
  1. dynamic input
)

Implementation

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