Type Definition javascriptcore_sys::JSObjectDeletePropertyCallback
source · pub type JSObjectDeletePropertyCallback = Option<unsafe extern "C" fn(ctx: JSContextRef, object: JSObjectRef, propertyName: JSStringRef, exception: *mut JSValueRef) -> bool>;Expand description
The callback invoked when deleting a property.
ctx: The execution context to use.object: TheJSObjectin which to delete the property.propertyName: AJSStringcontaining the name of the property to delete.exception: A pointer to aJSValueRefin which to return an exception, if any.
Returns true if propertyName was successfully deleted, otherwise false.
If you named your function DeleteProperty, you would declare it like this:
ⓘ
bool
DeleteProperty(JSContextRef ctx, JSObjectRef object,
JSStringRef propertyName, JSValueRef* exception);If this function returns false, the delete request forwards to
object’s statically declared properties, then its parent class
chain (which includes the default object class).