pub unsafe extern "C" fn JSObjectSetPropertyAtIndex(
ctx: JSContextRef,
object: JSObjectRef,
propertyIndex: c_uint,
value: JSValueRef,
exception: *mut JSValueRef,
)
Expand description
Sets a property on an object by numeric index.
ctx
: The execution context to use.object
: TheJSObjectRef
whose property you want to set.propertyIndex
: The property’s name as a number.value
: AJSValueRef
to use as the property’s value.exception
: A pointer to aJSValueRef
in which to store an exception, if any. PassNULL
if you do not care to store an exception.
Calling JSObjectSetPropertyAtIndex
is equivalent to calling
JSObjectSetProperty
with a string containing propertyIndex
,
but JSObjectSetPropertyAtIndex
provides optimized access to
numeric properties.