domInputValue function

String domInputValue(
  1. Object? target
)

Read the value of a form control from a DOM event target (web) via an explicit JS property read — avoids dynamic dispatch on package:web extension types, which throws on dart2js (Dart 3.11).

Implementation

String domInputValue(Object? target) {
  final JSObject? obj = target as JSObject?;
  final JSAny? v = obj?.getProperty<JSAny?>('value'.toJS);
  return (v as JSString?)?.toDart ?? '';
}