Context.registerClass
javascriptcore.class_.Class registerClass(string name, javascriptcore.class_.Class parentClass, javascriptcore.types.ClassVTable vtable, glib.types.DestroyNotify destroyNotify = null)Register a custom class in context using the given name. If the new class inherits from another #JSCClass, the parent should be passed as parent_class, otherwise null should be used. The optional vtable parameter allows to provide a custom implementation for handling the class, for example, to handle external properties not added to the prototype. When an instance of the #JSCClass is cleared in the context, destroy_notify is called with the instance as parameter.
Parameters
name | the class name |
parentClass | a #JSCClass or null |
vtable | an optional #JSCClassVTable or null |
destroyNotify | a destroy notifier for class instances |
Returns
a #JSCClass