call method

JSValue call(
  1. JSValue funcObj, {
  2. JSValue? thiz,
  3. int argc = 0,
  4. List<JSValue>? argv,
  5. bool autoDispose = true,
})

Implementation

JSValue call(
  JSValue funcObj, {
  JSValue? thiz,
  int argc = 0,
  List<JSValue>? argv,
  bool autoDispose = true,
}) {
  argv ??= [];
  return JSValue.ptr(
    this,
    JS_Call(
      _ref,
      funcObj.ref.ref,
      thiz?.ref.ref ?? JSValue.alloc(this, JSTag.NULL).ref.ref,
      argc,
      argv.ref,
    ),
    autoDispose: autoDispose,
  );
}