I want to load a JavaScript file using Jint, but I can\'t seem to figure it out. The documentation said I could do something like engine.run(file1), but it does
I found a workaround by manually loading the file into text myself, instead of loading it by name as mentioned here: http://jint.codeplex.com/discussions/265939
StreamReader streamReader = new StreamReader("test.js");
string script = streamReader.ReadToEnd();
streamReader.Close();
JintEngine js = new JintEngine();
js.Run(script);
object result = js.Run("return status;");
Console.WriteLine(result);
Console.ReadKey();