typedef struct {...} JSVM_CallbackStruct Defines the pointer to the data of the native callbacks provided by the user. These functions are exposed to JavaScript via JSVM-API.
Use scenario: Implements functions callable by JavaScript on the native layer, encapsulates C/C++ functions as JavaScript callbacks, and implements bidirectional interaction between native and JavaScript.
Features: Supports passing custom data to callback functions, provides a standard callback function signature, and serves as the infrastructure for cross-language invocation.
System capability: SystemCapability.ArkCompiler.JSVM
Since: 11
Related module: JSVM
Header file: jsvm_types.h
| Name | Description |
|---|---|
| JSVM_Value(JSVM_CDECL* callback)(JSVM_Env env, JSVM_CallbackInfo info) | Pointer to the user-provided native callback function. |