Function

JSObjectSetProperty

Sets a property on an object.

Declaration

void JSObjectSetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSPropertyAttributes attributes, JSValueRef *exception);

Parameters

ctx

The execution context to use.

object

The JSObject whose property you want to set.

propertyName

A JSString containing the property's name.

value

A JSValue to use as the property's value.

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.

attributes

A logically ORed set of JSPropertyAttributes to give to the property.