1

I am writing a WinRT application in C#.

I would like to execute some Javascript code. An entire WebView is not needed in my case, I just need to interface with a Javascript virtual machine. The C# code would call Javascript functions and would export some objects to the Javascript side.

I know there is JsRT, the C API of Chakra, the jsvm used by Internet Explorer. But JsRT, as far as I know, is not available to WinRT. Other virtual machines are not allowed under WinRT.

So, the question is: is it even possible to call Javascript code from C# code? If not, waiting for the release of JsRT for WinRT is the only option?

1 Answer 1

1

It's possible to call JavaScript from C# but not without a WebView control.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for the reply. It means calling InvokeScriptAsync in one way and receiving notifications through ScriptNotify event, right?
Sure, you could do it that way.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.