Method

JavaScriptCoreValueobject_invoke_methodv

Declaration [src]

JSCValue*
jsc_value_object_invoke_methodv (
  JSCValue* value,
  const char* name,
  guint n_parameters,
  JSCValue** parameters
)

Description [src]

Invoke method with name on object referenced by value, passing the given parameters. If n_parameters is 0 no parameters will be passed to the method. The object instance will be handled automatically even when the method is a custom one registered with jsc_class_add_method(), so it should never be passed explicitly as parameter of this function.

This function always returns a JSCValue, in case of void methods a JSCValue referencing undefined is returned.

This method is renamed to jsc_value_object_invoke_method() in language bindings

Parameters

name const char*
 

The method name.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
n_parameters guint
 

The number of parameters.

parameters An array of JSCValue*
 

The JSCValues to pass as parameters to the method, or NULL.

 The argument can be NULL.
 The length of the array is specified in the n_parameters argument.
 The data is owned by the caller of the function.

Return value

Returns: JSCValue
 

A JSCValue with the return value of the method.

 The caller of the method takes ownership of the data, and is responsible for freeing it.