handle varargs for js call to Dart callbacks