We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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