In addition to the answer above, there is also a version of .NET with open source JavaScript : its name is Jurassic and it is available in CodePlex:
http://jurassic.codeplex.com/
<strong> Examples:
Run the expression:
var engine = new Jurassic.ScriptEngine();
Console.WriteLine(engine.Evaluate<int>("1.5 + 2.4"));
Run the script command:
var engine = new Jurassic.ScriptEngine();
engine.ExecuteFile(@"c:\test.js");
Features of version 2.2 (taken from the website):
- Supports all ECMAScript 3 and ECMAScript 5 functionality, including ES5 strict mode
- Simple but powerful API
- Compiles JavaScript in .NET bytecode (CIL); not a translator
- Deploys as a single .NET assembly (no embedded code)
- Basic support for integrated debugging in Visual Studio
- Light code generation is used, therefore the generated code is completely garbage collected
- Tested on .NET 3.5, .NET 4 and Silverlight
source share