javascriptcore.types

D types for javascriptcore6 library

Types 14

aliasClassDeletePropertyFunction = bool delegate(javascriptcore.class_.Class jscClass, javascriptcore.context.Context context, void * instance, string name)

The type of delete_property in #JSCClassVTable. This is only required when you need to handle external properties not added to the prototype.

Parameters

jscClassa #JSCClass
contexta #JSCContext
instancethe jsc_class instance
namethe property name

Returns

true if handled or false to to forward the request to the parent class or prototype chain.
aliasClassEnumeratePropertiesFunction = string[] delegate(javascriptcore.class_.Class jscClass, javascriptcore.context.Context context, void * instance)

The type of enumerate_properties in #JSCClassVTable. This is only required when you need to handle external properties not added to the prototype.

Parameters

jscClassa #JSCClass
contexta #JSCContext
instancethe jsc_class instance

Returns

a null-terminated array of strings

containing the property names, or null if instance doesn't have enumerable properties.

The type of get_property in #JSCClassVTable. This is only required when you need to handle external properties not added to the prototype.

Parameters

jscClassa #JSCClass
contexta #JSCContext
instancethe jsc_class instance
namethe property name

Returns

a #JSCValue or null to forward the request to

the parent class or prototype chain

aliasClassHasPropertyFunction = bool delegate(javascriptcore.class_.Class jscClass, javascriptcore.context.Context context, void * instance, string name)

The type of has_property in #JSCClassVTable. This is only required when you need to handle external properties not added to the prototype.

Parameters

jscClassa #JSCClass
contexta #JSCContext
instancethe jsc_class instance
namethe property name

Returns

true if instance has a property with name or false to forward the request

to the parent class or prototype chain.

aliasClassSetPropertyFunction = bool delegate(javascriptcore.class_.Class jscClass, javascriptcore.context.Context context, void * instance, string name, javascriptcore.value.Value value)

The type of set_property in #JSCClassVTable. This is only required when you need to handle external properties not added to the prototype.

Parameters

jscClassa #JSCClass
contexta #JSCContext
instancethe jsc_class instance
namethe property name
valuethe #JSCValue to set

Returns

true if handled or false to forward the request to the parent class or prototype chain.

Function used to handle JavaScript exceptions in a #JSCContext.

Parameters

contexta #JSCContext
exceptiona #JSCException
aliasExecutor = void delegate(javascriptcore.value.Value resolve, javascriptcore.value.Value reject)

A function passed to jsc_value_new_promise called during initialization

It is called like a JavaScript function, so exceptions raised will not be propagated to the context, but handled by the promise causing a rejection. resolve and reject can be reffed for later use to handle async task completion.

Parameters

resolve#JSCValue function to call to resolve the promise
reject#JSCValue function to call to reject the promise
aliasOptionsFunc = bool delegate(string option, javascriptcore.types.OptionType type, string description)

Function used to iterate options.

Not that description string is not localized.

Parameters

optionthe option name
typethe option #JSCOptionType
descriptionthe option description, or null

Returns

true to stop the iteration, or false otherwise

Variables 7

enumvarMAJOR_VERSION = 2

Like [javascriptcore.global.getMajorVersion], but from the headers used at application compile time, rather than from the library linked against at application run time.

enumvarMICRO_VERSION = 1

Like [javascriptcore.global.getMicroVersion], but from the headers used at application compile time, rather than from the library linked against at application run time.

enumvarMINOR_VERSION = 48

Like [javascriptcore.global.getMinorVersion], but from the headers used at application compile time, rather than from the library linked against at application run time.

enumvarOPTIONS_USE_DFG = "useDFGJIT"

Allows the DFG JIT to be used if true. Option type: JSC_OPTION_BOOLEAN Default value: true.

enumvarOPTIONS_USE_FTL = "useFTLJIT"

Allows the FTL JIT to be used if true. Option type: JSC_OPTION_BOOLEAN Default value: true.

enumvarOPTIONS_USE_JIT = "useJIT"

Allows the executable pages to be allocated for JIT and thunks if true. Option type: JSC_OPTION_BOOLEAN Default value: true.

enumvarOPTIONS_USE_LLINT = "useLLInt"

Allows the LLINT to be used if true. Option type: JSC_OPTION_BOOLEAN Default value: true.