i have a desktop application and i really want to use some APIs that a开发者_Python百科re only available in their Javascript version.... (Waze API/Google Earth API), my question ... what is the best way if you think its possbile and worth it to perform this bridge between my C# desktop app with this javascript API ?
You can execute JScript from C#. Add a reference to Microsoft.JScript and use something like this:
using Microsoft.JScript;
object result = Microsoft.JScript.Eval.JScriptEvaluate("my javascript code", Microsoft.JScript.Vsa.VsaEngine.CreateEngine());
javascript is not adapted for desktop applications. You could use a WebBrowser to embed some web page widget which will execute the javascript.
精彩评论