Add method with @name to @jsc_class. When the method is called by JavaScript or jsc_value_object_invoke_method(),
@callback is called receiving the class instance as first parameter, followed by a #GPtrArray of #JSCValue<!-- -->s
with the method arguments and then @user_data as last parameter. When the method is cleared in the #JSCClass context,
@destroy_notify is called with @user_data as parameter.
Note that the value returned by @callback must be transfer full. In case of non-refcounted boxed types, you should use
%G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used.
If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created
with jsc_value_new_object() that receives the copy as the instance parameter.
Add method with @name to @jsc_class. When the method is called by JavaScript or jsc_value_object_invoke_method(), @callback is called receiving the class instance as first parameter, followed by a #GPtrArray of #JSCValue<!-- -->s with the method arguments and then @user_data as last parameter. When the method is cleared in the #JSCClass context, @destroy_notify is called with @user_data as parameter.
Note that the value returned by @callback must be transfer full. In case of non-refcounted boxed types, you should use %G_TYPE_POINTER instead of the actual boxed #GType to ensure that the instance owned by #JSCClass is used. If you really want to return a new copy of the boxed type, use #JSC_TYPE_VALUE and return a #JSCValue created with jsc_value_new_object() that receives the copy as the instance parameter.