Javascript Interpreter for .NET

I have a script where I need to run a Javascript interpreter in a .NET application. This will work on Windows Phone 7, so it should be compatible with the Compact Framework and because it probably won't be pre-packaged for the Windows Phone source, it can help there.

A licensing issue may also occur. We looked at using Jint, which is under the MIT license, but uses Antlr, which is under the BSD license (since I understand that Jint is in a non-compliance state so as not to redistribute Antlrโ€™s copyright and terms). Are there any other alternatives?

+6
javascript c # windows-phone-7 compact-framework
source share
6 answers

Since this question was asked, Yuri was released. This is the .NET Javascript interpreter that runs on the full CLR, as well as on the phone (or, as they claim).

I have not yet begun to migrate to him, so I donโ€™t know if he works, but here are interesting for some of you.

+1
source share

It was some effort, but I really was able to modify Jint to work on WP7. There was a bit of reflection that was easily rewritten (mainly for marshals from JS to .NET objects) and error passwords that needed to be fixed, but in the end they seemed to work.

I hope I can send them back to the Jint project when I have free time.

+5
source share

http://jurassic.codeplex.com

Although I do not know if the Compact Framework is compatible.

+4
source share

You can use JavaScript calls using the web browser control . It does not require additional libraries. You will need to hack a bit to make the control invisible, get data, etc., but it has to do the trick.

Or you can try this project:

Javascript.NET integrates the Javascript Engine of Google V8 and exposes it to the CLI. Compile Javascript.NET (at run time) and execute scripts directly from the .NET code. It allows CLI objects to be exposed and managed directly from Javascript executed.

+2
source share

As Brian says, you can run your Javascript in a web browser if you want - I think this might be your only option if you need to run JS.

There are also efforts to develop IronJS - https://github.com/fholm/IronJS - but I do not expect it to be ready for WP7 soon - and I do not expect it to fully function there.

If you can switch to another scripting language - Ruby - then IronRuby is available by phone (see iron7 pics and videos for what you can do with it).

0
source share

You should try: https://github.com/gatapia/js.net

I have not tried WP7, but can I work?

0
source share

All Articles