Callbacks¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- JavaScriptCore.ClassDeletePropertyFunction(jsc_class, context, instance, name)¶
- Parameters:
jsc_class (
JavaScriptCore.Class) – aJavaScriptCore.Classcontext (
JavaScriptCore.Context) – aJavaScriptCore.Contextname (
str) – the property name
- Returns:
Trueif handled orFalseto 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.Classcontext (
JavaScriptCore.Context) – aJavaScriptCore.Context
- Returns:
a
None-terminated array of strings containing the property names, orNoneif 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.Classcontext (
JavaScriptCore.Context) – aJavaScriptCore.Contextname (
str) – the property name
- Returns:
a
JavaScriptCore.ValueorNoneto 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.Classcontext (
JavaScriptCore.Context) – aJavaScriptCore.Contextname (
str) – the property name
- Returns:
Trueif instance has a property with name orFalseto 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.Classcontext (
JavaScriptCore.Context) – aJavaScriptCore.Contextname (
str) – the property namevalue (
JavaScriptCore.Value) – theJavaScriptCore.Valueto set
- Returns:
Trueif handled orFalseto 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.Contextexception (
JavaScriptCore.Exception) – aJavaScriptCore.Exception
Function used to handle JavaScript exceptions in a
JavaScriptCore.Context.
- JavaScriptCore.Executor(resolve, reject, *user_data)¶
- Parameters:
resolve (
JavaScriptCore.Value) –JavaScriptCore.Valuefunction to call to resolve the promisereject (
JavaScriptCore.Value) –JavaScriptCore.Valuefunction to call to reject the promise
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.
New in version 2.48.
- 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.