pub type JSObjectDeletePropertyCallback = Option<unsafe extern "C-unwind" fn(JSContextRef, JSObjectRef, JSStringRef, *mut JSValueRef) -> bool>;JSBase and JSObjectRef only.Expand description
The callback invoked when deleting a property.
Parameter ctx: The execution context to use.
Parameter object: The JSObject in which to delete the property.
Parameter propertyName: A JSString containing the name of the property to delete.
Parameter exception: A pointer to a JSValueRef in 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).
See also Apple’s documentation
Aliased Type§
pub enum JSObjectDeletePropertyCallback {
None,
Some(unsafe extern "C-unwind" fn(*const OpaqueJSContext, *mut OpaqueJSValue, *mut OpaqueJSString, *mut *const OpaqueJSValue) -> bool),
}Variants§
None
No value.
Some(unsafe extern "C-unwind" fn(*const OpaqueJSContext, *mut OpaqueJSValue, *mut OpaqueJSString, *mut *const OpaqueJSValue) -> bool)
Some value of type T.