Contents

setValue(_:forProperty:)

Sets the value of the named property in the JavaScript object value.

Declaration

func setValue(_ value: Any!, forProperty property: Any!)
func setValue(_ value: Any!, forProperty property: String!)

Parameters

  • value:

    The value to set for the named property.

  • property:

    The name of a property in the JavaScript object.

Discussion

Calling this method is equivalent to using the subscript operator with a string subscript in JavaScript. Use it to set or create fields or properties in JavaScript objects.

Topics

Related Documentation

See Also

Working with Container Values