0

I have a C# windows 10 app and I need to be able to run javascript. In .net I would use a WebView class to give me this ability but doesnt seem available in Native Windows 10 Universal App.

How would I be able to accomplish this?

Rob
  • 11,185
  • 10
  • 36
  • 54
  • I can only recommend the usage of the `Jint` Nuget-package at https://www.nuget.org/packages/Jint . Executing JavaScript is as easy as doing `object result = new JintEngine().Run("return 21 * 2");`. (https://jint.codeplex.com/wikipage?title=Quick%20Start&referringTitle=Documentation) – Maximilian Gerhardt Dec 09 '15 at 18:31

1 Answers1

2

You can continue to use a Webview, like this:

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <WebView />
</Grid>

Or you can give a try to ChakraBridge: https://blogs.msdn.microsoft.com/eternalcoding/2015/10/21/using-javascript-frameworks-from-your-cuwp-application/

Thanks,

Thomas LEBRUN
  • 436
  • 2
  • 7