Метод callMethod
dynamic callMethod(Вызывает method на объекте JavaScript с аргументами args и возвращает результат.
Тип method должен быть либо String, либо num.
Исходный код
callMethod(String method, [List args]) {
try {
return _callMethodLegacy(method, args);
} catch (e) {
if (hasProperty(method)) {
// Return a DomException if DOM call returned an error.
throw new html.DomException.jsInterop(e);
} else {
throw new NoSuchMethodError(this, new Symbol(method), args, null);
}
}
}
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-js/JsObject/callMethod.html