Looking to set a value to a JavaScript variable
In this scenario, I need to retrieve a value.
1. First, I create a basic function
Engine js = new Engine();
js.SetValue("get_s_width",new Action<int>(get_s_width));
public void get_s_width(int i)
{
js.Execute("function test() { return 100; } test();");
}
In this situation, attempting to return a value from a C# function results in displaying "null" on the screen after execution. How can this be resolved?
Any suggestions or ideas?