pub type JSObjectInitializeCallback = Option<unsafe extern "C-unwind" fn(JSContextRef, JSObjectRef)>;Available on crate features
JSBase and JSObjectRef only.Expand description
The callback invoked when an object is first created.
Parameter ctx: The execution context to use.
Parameter object: The JSObject being created.
If you named your function Initialize, you would declare it like this:
void Initialize(JSContextRef ctx, JSObjectRef object);
Unlike the other object callbacks, the initialize callback is called on the least derived class (the parent class) first, and the most derived class last.
See also Apple’s documentation
Aliased Type§
pub enum JSObjectInitializeCallback {
None,
Some(unsafe extern "C-unwind" fn(*const OpaqueJSContext, *mut OpaqueJSValue)),
}Variants§
None
No value.
Some(unsafe extern "C-unwind" fn(*const OpaqueJSContext, *mut OpaqueJSValue))
Some value of type T.