JSObjectInitializeCallback
The callback type for first creating an object.
Declaration
typealias JSObjectInitializeCallback = (JSContextRef?, JSObjectRef?) -> VoidParameters
- ctx:
The execution context to use.
- object:
The Jsobjectref to create.
Discussion
If you name your function Initialize, you declare it like this:
void Initialize(JSContextRef ctx, JSObjectRef object);Unlike the other object callbacks, the system calls the initialize callback on the least-derived class (the parent class) first, and the most-derived class last.