JSObjectDeletePropertyCallback
The callback type for deleting a property.
Declaration
typealias JSObjectDeletePropertyCallback = (JSContextRef?, JSObjectRef?, JSStringRef?, UnsafeMutablePointer<JSValueRef?>?) -> BoolParameters
- ctx:
The execution context to use.
- object:
The Jsobjectref to delete the property in.
- propertyName:
A Jsstringref that contains the name of the property to delete.
- exception:
A pointer to a Jsvalueref to return an exception in, if any.
Return Value
true if the deletion of propertyName succeeds; otherwise, false.
Discussion
If you name your function DeleteProperty, you declare it like this:
bool DeleteProperty(JSContextRef ctx, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception);If this function returns false, the delete request forwards to the object’s statically declared properties, and then its parent class chain (which includes the default object class).