JSObjectSetPropertyCallback typedef

Int8 JSObjectSetPropertyCallback (
  1. Pointer<NativeType> ctx,
  2. Pointer<NativeType> object,
  3. Pointer<NativeType> propertyName,
  4. Pointer<NativeType> value,
  5. Pointer<Pointer<NativeType>> exception
)

typedef JSObjectSetPropertyCallback The callback invoked when setting a property's value. ctx The execution context to use. object The JSObject on which to set the property's value. propertyName A JSString containing the name of the property to set. value A JSValue to use as the property's value. exception A pointer to a JSValueRef in which to return an exception, if any. @result true if the property was set, otherwise false. If you named your function SetProperty, you would declare it like this:

bool SetProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception);

If this function returns false, the set request forwards to object's statically declared properties, then its parent class chain (which includes the default object class). typedef bool (JSObjectSetPropertyCallback) (JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef exception);

Implementation

typedef JSObjectSetPropertyCallback = Int8 Function(Pointer ctx, Pointer object,
    Pointer propertyName, Pointer value, Pointer<Pointer> exception);