JavaScript Engine for Windows Phone

By on 10/12/2011

Edit: This is now available on GitHub: https://github.com/joelmartinez/Jint.Phone

Did a fun bit of hacking, ported the Jint JavaScript interpereter to Windows Phone 7.5 ... the result is seen below:



And when we run that code in a silverlight application:

mapped alert method

This would also work in XNA games for wp7, so one can imagine scripting scenarios if that's your cup of tea. Though it would take more work for this to be supported on the xbox since DynamicMethod is not supported there.

I was really happy to see that Windows Phone 7.1 (Mango) brings in support for the DynamicMethod and some of the other Reflection.Emit features. One of my previous projects (New LateBinder) showed significant perf benefits to using this over regular old reflection.

I had to overcome some quirks due to the slight differences in the compact framework, but after some time I got it all working ... so far all my tests have been successful (though it's not to say it's all fully working). Many props to the team of developers that did this over at codeplex.

See more in the archives