JSValue.newArrayBufferCopy constructor
JS_NewArrayBufferCopy
Implementation
factory JSValue.newArrayBufferCopy(
JSContext ctx,
Uint8List buf,
int len, {
bool autoDispose = true,
}) =>
JSValue(
ctx,
calloc.call<JSValue_>(sizeOf<JSValue_>())
..ref = JS_NewArrayBufferCopy(
ctx.ref,
buf.toCAny() as Pointer<Uint8>,
len,
),
autoDispose: autoDispose,
);