Function js::jsapi::JS_ArrayBufferHasData [] [src]

pub unsafe extern "C" fn JS_ArrayBufferHasData(obj: *mut JSObject) -> bool

Return true if the arrayBuffer contains any data. This will return false for ArrayBuffer.prototype and detached ArrayBuffers.

|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.