Type Definition javascriptcore_sys::JSObjectGetPropertyCallback [] [src]

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

The callback invoked when getting a property's value.

Returns the property's value if object has the property, otherwise NULL.

If you named your function GetProperty, you would declare it like this:

JSValueRef
GetProperty(JSContextRef ctx, JSObjectRef object,
            JSStringRef propertyName, JSValueRef* exception);

If this function returns NULL, the get request forwards to object's statically declared properties, then its parent class chain (which includes the default object class), then its prototype chain.