1

I am developing an Universal Windows App using c# and XAML. And the requirement is in the App I need to pass a value to a Javascript code to get a result.

Is there any JavaScript engine for Universal Windows App similar to JavaScriptCore in IOS. If so please advice me.

2 Answers 2

3

You can use Jint (https://github.com/sebastienros/jint). I just tested and confirmed that it works in XAML Universal Apps. Just add the NuGet package and follow the docs.

From the official docs:

    var engine = new Engine()
        .SetValue("log", new Action<object>(Console.WriteLine));

    engine.Execute(@"
      function hello() { 
        log('Hello World');
      };

      hello();
    ");
1
  • Thanks a Bunch @alexchardin
    – Mini-Con
    Commented Nov 19, 2015 at 6:17
1

You can host Microsoft's JavaScript Runtime (JsRT) in Universal Windows Platform apps. This will allow your app to process scripts with the Edge Chakra engine.

See Hosting the JavaScript Runtime on MSDN for details.

1
  • will it support in Windows 8.1? Since its processing scripts with Edge Chakra engine
    – Mini-Con
    Commented Nov 19, 2015 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.