Callbacks

ClassDeletePropertyFunction (jsc_class, context, instance, name)

ClassEnumeratePropertiesFunction (jsc_class, context, instance)

ClassGetPropertyFunction (jsc_class, context, instance, name)

ClassHasPropertyFunction (jsc_class, context, instance, name)

ClassSetPropertyFunction (jsc_class, context, instance, name, value)

ExceptionHandler (context, exception, *user_data)

OptionsFunc (option, type, description, *user_data)

Details

JavaScriptCore.ClassDeletePropertyFunction(jsc_class, context, instance, name)
Parameters:
Returns:

True if handled or False to to forward the request to the parent class or prototype chain.

Return type:

bool

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

JavaScriptCore.ClassEnumeratePropertiesFunction(jsc_class, context, instance)
Parameters:
Returns:

a None-terminated array of strings containing the property names, or None if instance doesn’t have enumerable properties.

Return type:

[str] or None

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

JavaScriptCore.ClassGetPropertyFunction(jsc_class, context, instance, name)
Parameters:
Returns:

a JavaScriptCore.Value or None to forward the request to the parent class or prototype chain

Return type:

JavaScriptCore.Value or None

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

JavaScriptCore.ClassHasPropertyFunction(jsc_class, context, instance, name)
Parameters:
Returns:

True if instance has a property with name or False to forward the request to the parent class or prototype chain.

Return type:

bool

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

JavaScriptCore.ClassSetPropertyFunction(jsc_class, context, instance, name, value)
Parameters:
Returns:

True if handled or False to forward the request to the parent class or prototype chain.

Return type:

bool

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

JavaScriptCore.ExceptionHandler(context, exception, *user_data)
Parameters:

Function used to handle JavaScript exceptions in a JavaScriptCore.Context.

JavaScriptCore.OptionsFunc(option, type, description, *user_data)
Parameters:
Returns:

True to stop the iteration, or False otherwise

Return type:

bool

Function used to iterate options.

Not that description string is not localized.

New in version 2.24.