setElementValue function

bool setElementValue(
  1. Element? element,
  2. String value
)

Sets the element value depending of the identified type.

Implementation

bool setElementValue(Element? element, String value) {
  if (element == null) return false;

  if (element.isA<HTMLInputElement>()) {
    (element as HTMLInputElement).value = value;
    return true;
  } else {
    return setElementSRC(element, value);
  }
}