isInstanceOfConstructor method

bool isInstanceOfConstructor(
  1. JSObject constructor
)

Implementation

bool isInstanceOfConstructor(JSObject constructor) {
  final JSException exception = JSException.create(_context);
  try {
    final bool result = js_bd.JSValueIsInstanceOfConstructor(_context.ref, _ref, constructor.ref, exception.ref);
    if (exception.shouldThrow) {
      throw exception.error;
    }
    return result;
  } finally {
    exception.release();
  }
}