Function script::dom::bindings::import::module::jsapi::JS::ArrayBufferHasData

source ยท
pub unsafe extern "C" fn ArrayBufferHasData(
    obj: *mut JSObject,
) -> bool
Expand description

Return true if the ArrayBuffer |obj| contains any data, i.e. it is not a detached ArrayBuffer. (ArrayBuffer.prototype is not an ArrayBuffer.)

|obj| must have passed a JS::IsArrayBufferObject test, or somehow be known that it would pass such a test: it is an ArrayBuffer or a wrapper of an ArrayBuffer, and the unwrapping will succeed.