Method

JavaScriptCoreValueobject_invoke_method

Declaration [src]

JSCValue*
jsc_value_object_invoke_method (
  JSCValue* value,
  const char* name,
  GType first_parameter_type,
  ...
)

Description [src]

Invoke method with name on object referenced by value, passing the given parameters. If first_parameter_type is G_TYPE_NONE 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 not directly available to language bindings.
The implementation of this method is provided by jsc_value_object_invoke_methodv() 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.
first_parameter_type GType
 

GType of first parameter, or G_TYPE_NONE.

...
 

Value of the first parameter, followed optionally by more type/value pairs, followed by G_TYPE_NONE.

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.