Instance Method

setObject(_:atIndexedSubscript:)

Sets the value’s JavaScript property at the specified index, allowing subscript syntax.

Declaration

func setObject(_ object: Any!, atIndexedSubscript index: Int)

Parameters

object

The value to set at the specified index.

index

An index in the JavaScript object.

Discussion

This method is equivalent to the setValue(_:at:) method, but provides Objective-C subscripting support.

See Also

Accessing Values with Subscript Syntax

func objectAtIndexedSubscript(Int) -> JSValue!

Returns the value’s JavaScript property at the specified index, allowing subscript syntax.

func objectForKeyedSubscript(Any!) -> JSValue!

Returns the value’s JavaScript property named with the specified key, allowing subscript syntax.

func setObject(Any!, forKeyedSubscript: Any!)

Sets the value’s JavaScript property named with the specified key, allowing subscript syntax.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software