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

source ·
pub unsafe extern "C" fn SetArrayLength(
    cx: *mut JSContext,
    obj: Handle<*mut JSObject>,
    length: u32,
) -> bool
Expand description

Perform |obj.length = length| as if in strict mode code, with a fast path for the case where |obj| is an Array.

This operation is exactly and only assigning to a “length” property. In general, it can invoke an existing “length” setter, throw if the property is non-writable, or do anything else a property-set operation might do.