setInputMaxLength function

void setInputMaxLength(
  1. dynamic input,
  2. int value
)

Implementation

void setInputMaxLength(input, int value) {
  assert(isInputElement(input));
  if (input is HTMLInputElement && input.isA<HTMLInputElement>())
    input.maxLength = value;
  else if (input is HTMLTextAreaElement && input.isA<HTMLTextAreaElement>())
    input.maxLength = value;
}