Function

JSObjectSetProperty(_:_:_:_:_:_:)

Sets a property on an object.

Declaration

func JSObjectSetProperty(_ ctx: JSContextRef!, _ object: JSObjectRef!, _ propertyName: JSStringRef!, _ value: JSValueRef!, _ attributes: JSPropertyAttributes, _ exception: UnsafeMutablePointer<JSValueRef?>!)

Parameters

ctx

The execution context to use.

object

The JSObject whose property you want to set.

propertyName

A JSString containing the property's name.

value

A JSValue to use as the property's value.

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.

attributes

A logically ORed set of JSPropertyAttributes to give to the property.