I have JS code:
function on_save() {
Service.AddTableRow([{id: 21194, value: "jjkk"}, {id: 1234, value: "Lala"}]);
return true;
}
Into c# I do:
var engine = new V8ScriptEngine();
engine.AddHostObject("Service", scriptService);
engine.Execute(content);
result = engine.Script.on_save();
Into scriptService
I have:
public void AddTableRow(Dictionary<string, object> values)
{
//but there is invalid argument "values"
//I also tried List<object> param type but result is the same
}
How can I resolve this issue?