locked
How about JS files referenced in WinRT? RRS feed

  • Question

  • I want to create a js file, which contains a number of functions. And in the WinRT C # to call these functions, and you can get results.
    I have tried using the WebView control, but it does not support multi-threaded access.
    I have found an ActiveX control, Windows Script Control, but he does not support WinRT, there are similar this control? Or there are other ways.

    ref:http://www.microsoft.com/en-us/download/default.aspx

    Friday, September 6, 2013 10:19 AM

Answers

  • No, you can't do this.  That's a very old control.  I still don't understand your scenario. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Monday, September 9, 2013 12:53 PM
    Moderator

All replies

  • Do you want the js functions to run inside a WebView, or do you want it to interact with the app itself?  I don't think that there's any way to call JS functions from C# at all.  What are you trying to achieve?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, September 6, 2013 1:12 PM
    Moderator
  • Thank you for your reply!!

    I want to call JS functions from C#, it like use the Script Control:http://msdn.microsoft.com/en-us/library/aa227633(v=vs.60).aspx , But I can't use it in WinRT.Is there any way to solve?

    Saturday, September 7, 2013 1:49 AM
  • No, you can't do this.  That's a very old control.  I still don't understand your scenario. 

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Monday, September 9, 2013 12:53 PM
    Moderator