let's assume we have a *.js file includeded in our C# UWP App project and we want to be able to execute function included in this file.
sample JS function:
function myFunction(p1, p2) {
return p1 * p2; // The function returns the product of p1 and p2
}
sample C# code:
public class SampleObject
{
public SampleObject(int a, int b)
{
var evaluated = <<< do some magic and get myFuction(a,b) here >>>
}
}
Is there any way other that keeping some dummy WebView with our JS loaded and calling myFunction from it? I've read about Chakra that looks like something that should do the trick, but I don't know how to use it the way I want. Any few-lines sample?