Contents

JSObjectDeletePropertyForKey(_:_:_:_:)

Deletes a property from an object using a JavaScript value as the property key.

Declaration

func JSObjectDeletePropertyForKey(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ propertyKey: JSValueRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> Bool

Parameters

  • ctx:

    The execution context to use.

  • object:

    The Jsobjectref with the property you want to delete.

  • propertyKey:

    A Jsvalueref that contains the property key to use when looking up the property.

  • exception:

    A pointer to a Jsvalueref to store an exception in, if any. Pass NULL to discard any exception.

Return Value

true if the delete operation succeeds; otherwise, false, such as when the property has the kJSPropertyAttributeDontDelete attribute set.

Discussion

This function is the same as performing delete object[propertyKey] from JavaScript.

See Also

Working with Objects