Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- JavaScriptCore.ClassDeletePropertyFunction(jsc_class, context, instance, name)¶
- Parameters:
jsc_class (
JavaScriptCore.Class
) – aJavaScriptCore.Class
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
name (
str
) – the property name
- Returns:
True
if handled orFalse
to to forward the request to the parent class or prototype chain.- Return type:
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:
jsc_class (
JavaScriptCore.Class
) – aJavaScriptCore.Class
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
- Returns:
a
None
-terminated array of strings containing the property names, orNone
if instance doesn’t have enumerable properties.- Return type:
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:
jsc_class (
JavaScriptCore.Class
) – aJavaScriptCore.Class
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
name (
str
) – the property name
- Returns:
a
JavaScriptCore.Value
orNone
to forward the request to the parent class or prototype chain- Return type:
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:
jsc_class (
JavaScriptCore.Class
) – aJavaScriptCore.Class
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
name (
str
) – the property name
- Returns:
True
if instance has a property with name orFalse
to forward the request to the parent class or prototype chain.- Return type:
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:
jsc_class (
JavaScriptCore.Class
) – aJavaScriptCore.Class
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
name (
str
) – the property namevalue (
JavaScriptCore.Value
) – theJavaScriptCore.Value
to set
- Returns:
True
if handled orFalse
to forward the request to the parent class or prototype chain.- Return type:
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:
context (
JavaScriptCore.Context
) – aJavaScriptCore.Context
exception (
JavaScriptCore.Exception
) – aJavaScriptCore.Exception
Function used to handle JavaScript exceptions in a
JavaScriptCore.Context
.
- JavaScriptCore.OptionsFunc(option, type, description, *user_data)¶
- Parameters:
option (
str
) – the option nametype (
JavaScriptCore.OptionType
) – the optionJavaScriptCore.OptionType
- Returns:
- Return type:
Function used to iterate options.
Not that description string is not localized.
New in version 2.24.