javascriptcore.class_
Module for [Class] class
Module Initializers 1
shared static this
()Types 3
classClass : gobject.object.ObjectWrap
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 #GCallback<!-- -->s to implement them.
Methods
ClassGidBuilder builder() static nothrowGet builder for [javascriptcore.class_.Class] Returns: New builder objectjavascriptcore.class_.Class parent() @property nothrowGet `parent` property. Returns: The parent class or null in case of final classes.Value addConstructor(alias Ctor)(string name = null) if (isCallable!Ctor && is(ReturnType!Ctor : Object)) nothrowAdd a constructor to a Class. If name is empty (null), the class name will be used. After creating the constructor, it needs to be added to an object as a property to be able to use it. Use [Contex...void addMethod(alias Method)(string name = null) if (isCallable!Method) nothrowAdd a method to a Class. Params: Method = The method name = The JSC name of the method or null to use the D method name (default)void readOnlyProperty() nothrowUsed as a default value for addProperty template Setter argument which results in a read-only propertyvoid addProperty(alias Getter, alias Setter = readOnlyProperty)(string name) if ((isCallable!Getter && !is(ReturnType!Getter == void) && Parameters!Getter.length == 0)
&& (__traits(isSame, Setter, readOnlyProperty)
|| (isCallable!Setter && is(ReturnType!Setter == void) && Parameters!Setter.length == 1))) nothrowAdd a property to a Class. Params: Getter = The getter method Setter = The setter method (optional) name = The property namejavascriptcore.class_.Class getParent() nothrowGet the parent class of jsc_class Returns: the parent class of jsc_classFluent builder implementation template for javascriptcore.class_.Class
Methods
T context(javascriptcore.context.Context propval) nothrowSet `context` property. Params: propval = The #JSCContext in which the class was registered. Returns: Builder instance for fluent chainingT name(string propval) nothrowSet `name` property. Params: propval = The name of the class. Returns: Builder instance for fluent chainingT parent(javascriptcore.class_.Class propval) nothrowSet `parent` property. Params: propval = The parent class or null in case of final classes. Returns: Builder instance for fluent chainingFluent builder for javascriptcore.class_.Class
Variables 1
var
Quark jscObjectQuark