You can call any .NET from JavaScript using the SetGlobalFunction API. For example:
SetGlobalFunction
var engine = new Jurassic.ScriptEngine(); engine.SetGlobalFunction("test", new Func<int, int, int>((a, b) => a + b)); Console.WriteLine(engine.Evaluate<int>("test(5, 6)"));
This code will output "11" to the console.
Note the following:
Next tutorial: Calling a JavaScript function from .NET
There was an error while loading. Please reload this page.