feat:Add callId for debugging call
This commit is contained in:
@@ -98,7 +98,8 @@ function initNativeEnvironment(source) {
|
||||
});
|
||||
break;
|
||||
case "invokeMethod":
|
||||
console.log("invokeMethod", payload);
|
||||
const callId = payload.callId;
|
||||
console.log("invokeMethod", callId, payload);
|
||||
const values = payload.values;
|
||||
let args = [];
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
@@ -125,12 +126,13 @@ function initNativeEnvironment(source) {
|
||||
const object = Reflect.get(global, payload.objectName);
|
||||
const method = Reflect.get(object, payload.functionName);
|
||||
const result = Reflect.apply(method, undefined, args);
|
||||
console.log(result);
|
||||
console.log("Result", callId, result);
|
||||
ws.send(JSON.stringify({
|
||||
type: "D2C",
|
||||
cmd: 'invokeMethod',
|
||||
payload: {
|
||||
result
|
||||
result,
|
||||
callId,
|
||||
}
|
||||
}));
|
||||
break;
|
||||
|
Reference in New Issue
Block a user