How to call JavaScript from C# - Cordova/PhoneGap

前端 未结 4 894
生来不讨喜
生来不讨喜 2021-01-18 05:10

I\'m using cordova/phonegap to make a windows phone app, i\'m trying to call a script from C# when an event fires.

Is there anyway to do this?

here\'s my cla

4条回答
  •  悲哀的现实
    2021-01-18 05:38

    You could use DispatchCommandResult(); as outlined in the cordova documents. That way you can call the c# method, send whatever you need in the callback, and then just execute the javascript from within javascript.

提交回复
热议问题