Type Definition javascriptcore_sys::JSObjectSetPropertyCallback [] [src]

type JSObjectSetPropertyCallback = Option<unsafe extern "C" fn(_: JSContextRef, _: JSObjectRef, _: JSStringRef, _: JSValueRef, _: *mut JSValueRef) -> bool>;

The callback invoked when setting a property's value.

Returns 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).