pub unsafe extern "C-unwind" fn JSObjectSetPropertyForKey(
ctx: JSContextRef,
object: JSObjectRef,
property_key: JSValueRef,
value: JSValueRef,
attributes: JSPropertyAttributes,
exception: *mut JSValueRef,
)Available on crate features
JSBase and JSObjectRef only.Expand description
Sets a property on an object using a JSValueRef as the property key.
Parameter ctx: The execution context to use.
Parameter object: The JSObject whose property you want to set.
Parameter propertyKey: A JSValueRef containing the property key to use when looking up the property.
Parameter value: A JSValueRef to use as the property’s value.
Parameter attributes: A logically ORed set of JSPropertyAttributes to give to the property.
Parameter exception: A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.
This function is the same as performing “object[propertyKey] = value” from JavaScript.
§Safety
ctxmust be a valid pointer.objectmust be a valid pointer.property_keymust be a valid pointer.valuemust be a valid pointer.exceptionmust be a valid pointer.