pub unsafe extern "C" fn JSObjectSetPropertyForKey(
ctx: JSContextRef,
object: JSObjectRef,
propertyKey: JSValueRef,
value: JSValueRef,
attributes: JSPropertyAttributes,
exception: *mut JSValueRef,
)
Expand description
Sets a property on an object using a JSValueRef
as the property key.
ctx
: The execution context to use.object
:TheJSObjectRef
whose property you want to set.propertyKey
: AJSValueRef
containing the property key to use when looking up the property.value
: AJSValueRef
to use as the property’s value.attributes
: A logically ORed set ofJSPropertyAttributes
to give to the property.exception
: A pointer to aJSValueRef
in which to store an exception, if any. PassNULL
if you do not care to store an exception.
This function is the same as performing object[propertyKey] = value
from JavaScript.