Function

JSObjectGetProperty(_:_:_:_:)

Gets a property from an object.

Declaration

func JSObjectGetProperty(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ propertyName: JSStringRef!, _ exception: UnsafeMutablePointer<JSValueRef?>!) -> JSValueRef!

Parameters

ctx

The execution context to use.

object

The JSObject whose property you want to get.

propertyName

A JSString containing the property's name.

exception

A pointer to a JSValueRef in which to store an exception, if any. Pass NULL if you do not care to store an exception.

Return Value

The property's value if object has the property, otherwise the undefined value.