pub unsafe fn new_array_buffer(
    ctx: *mut JSContext,
    buf: Vec<u8>
) -> Result<JSValueRef, JsError>
Expand description

this method creates a new ArrayBuffer which is used as a basis for all typed arrays the buffer vec is stored and used in js, when it is no longer needed it is dropped

Safety

QuickJsRealmAdapter should not be dropped before using this, e.g. the context should still be valid