JSObject.makeConstructor constructor

JSObject.makeConstructor(
  1. JSContext context, {
  2. JSClass? clazz,
  3. Pointer<NativeFunction<JSObjectCallAsConstructorCallback>>? callAsConstructor,
})

Implementation

factory JSObject.makeConstructor(
  JSContext context, {
  JSClass? clazz,
  Pointer<NativeFunction<js_bd.JSObjectCallAsConstructorCallback>>? callAsConstructor,
}) {
  return JSObject(
    context,
    js_bd.JSObjectMakeConstructor(
      context.ref,
      clazz?.ref ?? nullptr,
      callAsConstructor ?? nullptr,
    ),
  );
}