Calls method on the JavaScript object with the arguments args and returns the result.

The type of method must be either String or num.

Source

callMethod(String method, [List args]) {
  try {
    if (args != null) {
      for (var i = 0; i < args.length; i++)
        args[i] = unwrap_jso(args[i]);
    }
    return _callMethod(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);
    }
  }
}