JSObjectHasPropertyForKey(_:_:_:_:)
Tests whether an object has the specified property using a JavaScript value as the property key.
Declaration
func JSObjectHasPropertyForKey(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ propertyKey: JSValueRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> BoolParameters
- ctx:
The execution context to use.
- object:
The Jsobjectref to test.
- 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
NULLto discard any exception.
Return Value
true if the object has a property with a name that matches propertyKey; otherwise, false.
Discussion
This function is the same as performing propertyKey in object from JavaScript.
See Also
Working with Objects
JSObjectCallAsConstructor(_:_:_:_:_:)JSObjectCallAsFunction(_:_:_:_:_:_:)JSObjectCopyPropertyNames(_:_:)JSObjectDeleteProperty(_:_:_:_:)JSObjectGetPrivate(_:)JSObjectGetProperty(_:_:_:_:)JSObjectGetPropertyAtIndex(_:_:_:_:)JSObjectGetPrototype(_:_:)JSObjectHasProperty(_:_:_:)JSObjectIsConstructor(_:_:)JSObjectIsFunction(_:_:)JSObjectMake(_:_:_:)JSObjectMakeArray(_:_:_:_:)JSObjectMakeConstructor(_:_:_:)JSObjectMakeDate(_:_:_:_:)