Function

JSObjectSetPrivate

Sets a pointer to private data on an object.

Declaration

bool JSObjectSetPrivate(JSObjectRef object, void *data);

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.