Function

JSObjectSetPrivate(_:_:)

Sets a pointer to private data on an object.

Declaration

func JSObjectSetPrivate(_ object: JSObjectRef!, _ data: UnsafeMutableRawPointer!) -> Bool

Parameters

object

The JSObject whose private data you want to set.

data

A void* to set as the object's private data.

Return Value

true if object can store private data, otherwise false.

Discussion

The default object class does not allocate storage for private data. Only objects created with a non-NULL JSClass can store private data.