JSValue.newError constructor
Implementation
factory JSValue.newError(
JSContext ctx,
String errorStr, {
bool autoDispose = true,
}) {
final errorConstructor = ctx.globalObject.getPropertyStr('Error');
return errorConstructor.callConstructor(
argv: [JSValue.newString(ctx, errorStr)],
);
}