Function js::jsapi::JS_NewDataView [] [src]

pub unsafe extern "C" fn JS_NewDataView(
    cx: *mut JSContext,
    arrayBuffer: HandleObject,
    byteOffset: u32,
    byteLength: i32
) -> *mut JSObject

Create a new DataView using the given ArrayBuffer for storage. The given buffer must be an ArrayBuffer (or a cross-compartment wrapper of an ArrayBuffer), and the offset and length must fit within the bounds of the arrayBuffer. Currently, nullptr will be returned and an exception will be thrown if these conditions do not hold, but do not depend on that behavior.