Class

JavaScriptCoreClass

Description [src]

final class JavaScriptCore.Class : GObject.Object
{
  /* No available fields */
}

A JSSClass represents a custom JavaScript class registered by the user in a JSCContext. It allows to create new JavaScripts objects whose instances are created by the user using this API. It’s possible to add constructors, properties and methods for a JSSClass by providing GCallbacks to implement them.

Hierarchy

hierarchy this JSCClass ancestor_0 GObject ancestor_0--this

Ancestors

Instance methods

jsc_class_add_constructor

Add a constructor to jsc_class. If name is NULL, the class name will be used. When new is used with the constructor or jsc_value_constructor_call() is called, callback is invoked receiving the parameters and user_data as the last parameter. When the constructor object is cleared in the JSCClass context, destroy_notify is called with user_data as parameter.

jsc_class_add_constructor_variadic

Add a constructor to jsc_class. If name is NULL, the class name will be used. When new is used with the constructor or jsc_value_constructor_call() is called, callback is invoked receiving a GPtrArray of JSCValues as arguments and user_data as the last parameter. When the constructor object is cleared in the JSCClass context, destroy_notify is called with user_data as parameter.

jsc_class_add_constructorv

Add a constructor to jsc_class. If name is NULL, the class name will be used. When new is used with the constructor or jsc_value_constructor_call() is called, callback is invoked receiving the parameters and user_data as the last parameter. When the constructor object is cleared in the JSCClass context, destroy_notify is called with user_data as parameter.

jsc_class_add_method

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 the method parameters 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.

jsc_class_add_method_variadic

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 JSCValues 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.

jsc_class_add_methodv

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 the method parameters 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.

jsc_class_add_property

Add a property with name to jsc_class. When the property value needs to be getted, getter is called receiving the the class instance as first parameter and user_data as last parameter. When the property value needs to be set, setter is called receiving the the class instance as first parameter, followed by the value to be set and then user_data as the last parameter. When the property is cleared in the JSCClass context, destroy_notify is called with user_data as parameter.

jsc_class_get_name

Get the class name of jsc_class.

jsc_class_get_parent

Get the parent class of jsc_class.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

JavaScriptCore.Class:context

The JSCContext in which the class was registered.

JavaScriptCore.Class:name

The name of the class.

JavaScriptCore.Class:parent

The parent class or NULL in case of final classes.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct JavaScriptCoreClassClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.