mirror of
https://github.com/openharmony/interface_sdk_c.git
synced 2026-08-24 14:32:50 -04:00
!373 新增napi接口napi_load_module_with_info
Merge pull request !373 from chenlincl3/module_info
This commit is contained in:
@@ -164,10 +164,15 @@
|
||||
"name": "napi_destroy_ark_runtime"
|
||||
},
|
||||
{
|
||||
"first_introduced": "12",
|
||||
"name": "napi_run_event_loop"
|
||||
},
|
||||
{
|
||||
"first_introduced": "12",
|
||||
"name": "napi_stop_event_loop"
|
||||
},
|
||||
{
|
||||
"first_introduced": "12",
|
||||
"name": "napi_load_module_with_info"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -78,6 +78,21 @@ typedef napi_value (*napi_native_binding_attach_callback)(napi_env env, void* na
|
||||
NAPI_EXTERN napi_status napi_run_script_path(napi_env env, const char* path, napi_value* result);
|
||||
NAPI_EXTERN napi_status napi_queue_async_work_with_qos(napi_env env, napi_async_work work, napi_qos_t qos);
|
||||
NAPI_EXTERN napi_status napi_load_module(napi_env env, const char* path, napi_value* result);
|
||||
|
||||
/**
|
||||
* @brief The module is loaded through the NAPI. By default, the default object is exported from the module.
|
||||
*
|
||||
* @param env Current running virtual machine context.
|
||||
* @param path Path name of the module to be loaded, like @ohos.hilog.
|
||||
* @param module_info Path names of bundle and module, like com.example.application/entry.
|
||||
* @param result Result of loading a module, which is an exported object of the module.
|
||||
* @return Returns the function execution status.
|
||||
* @since 12
|
||||
*/
|
||||
NAPI_EXTERN napi_status napi_load_module_with_info(napi_env env,
|
||||
const char* path,
|
||||
const char* module_info,
|
||||
napi_value* result);
|
||||
NAPI_EXTERN napi_status napi_get_instance_data(napi_env env, void** data);
|
||||
NAPI_EXTERN napi_status napi_set_instance_data(napi_env env,
|
||||
void* data,
|
||||
|
||||
Reference in New Issue
Block a user