---
title: JSObjectDeletePropertyCallback
framework: javascriptcore
role: symbol
role_heading: Type Alias
path: javascriptcore/jsobjectdeletepropertycallback
---

# JSObjectDeletePropertyCallback

The callback type for deleting a property.

## Declaration

```swift
typealias JSObjectDeletePropertyCallback = (JSContextRef?, JSObjectRef?, JSStringRef?, UnsafeMutablePointer<JSValueRef?>?) -> Bool
```

## Parameters

- `ctx`: The execution context to use.
- `object`: The doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSObjectRef to delete the property in.
- `propertyName`: A doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSStringRef that contains the name of the property to delete.
- `exception`: A pointer to a doc://com.apple.javascriptcore/documentation/JavaScriptCore/JSValueRef to return an exception in, if any.

## Return Value

Return Value true if the deletion of propertyName succeeds; otherwise, false.

## Discussion

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

## See Also

### Managing Callbacks

- [initialize](javascriptcore/jsclassdefinition/initialize.md)
- [JSObjectInitializeCallback](javascriptcore/jsobjectinitializecallback.md)
- [finalize](javascriptcore/jsclassdefinition/finalize.md)
- [JSObjectFinalizeCallback](javascriptcore/jsobjectfinalizecallback.md)
- [hasProperty](javascriptcore/jsclassdefinition/hasproperty.md)
- [JSObjectHasPropertyCallback](javascriptcore/jsobjecthaspropertycallback.md)
- [getProperty](javascriptcore/jsclassdefinition/getproperty.md)
- [JSObjectGetPropertyCallback](javascriptcore/jsobjectgetpropertycallback.md)
- [setProperty](javascriptcore/jsclassdefinition/setproperty.md)
- [JSObjectSetPropertyCallback](javascriptcore/jsobjectsetpropertycallback.md)
- [deleteProperty](javascriptcore/jsclassdefinition/deleteproperty.md)
- [getPropertyNames](javascriptcore/jsclassdefinition/getpropertynames.md)
- [JSObjectGetPropertyNamesCallback](javascriptcore/jsobjectgetpropertynamescallback.md)
- [callAsFunction](javascriptcore/jsclassdefinition/callasfunction.md)
- [JSObjectCallAsFunctionCallback](javascriptcore/jsobjectcallasfunctioncallback.md)
