Go to the source code of this file.
◆ dynxx_js_call()
| const char * dynxx_js_call |
( |
const char * |
func, |
|
|
const char * |
params, |
|
|
bool |
await |
|
) |
| |
Call JS function.
- Warning
- Not accessible in JS/Lua!
- Parameters
-
| func | JS function name |
| params | JS function params(wrap multiple params with json) |
| await | Whether wait for the promise result or not |
- Returns
- return value of JS function
◆ dynxx_js_loadB()
| bool dynxx_js_loadB |
( |
const byte * |
bytes, |
|
|
size_t |
len, |
|
|
bool |
is_module |
|
) |
| |
Load JS ByteCode.
- Warning
- Not accessible in JS/Lua!
- Parameters
-
| bytes | Byte array data |
| len | Byte array length |
| is_module | Whether the js import modules or not |
- Returns
- success or not
◆ dynxx_js_loadF()
Load JS file.
- Warning
- Not accessible in JS/Lua!
- Parameters
-
| file | JS file path |
| is_module | Whether the js import modules or not |
- Returns
- success or not
◆ dynxx_js_loadS()
| bool dynxx_js_loadS |
( |
const char * |
script, |
|
|
const char * |
name, |
|
|
bool |
is_module |
|
) |
| |
Load JS Script.
- Warning
- Not accessible in JS/Lua!
- Parameters
-
| script | JS script |
| name | JS file name |
| is_module | Whether the js import modules or not |
- Returns
- success or not
◆ dynxx_js_set_msg_callback()
| void dynxx_js_set_msg_callback |
( |
const char *(*)(const char *msg) |
callback | ) |
|
Set JS msg callback.
- Parameters
-