[ComVisible(true)]
public class JavaScriptBridge
{
public int Sum(int[] items)
{
return items.Sum();
}
}
My Coe in JavaScript:
alert(await bridge.Sum([3, 5, 8]));
But it didn't work.
I understand that I can work around this issue by using JSON.stringify() to convert an array in JavaScript to a plain string, and pass it to JavaScriptBridge. I just want to know whether there is a more graceful approach?
Thanks.
My code in C#
My Coe in JavaScript:
But it didn't work.
I understand that I can work around this issue by using JSON.stringify() to convert an array in JavaScript to a plain string, and pass it to JavaScriptBridge. I just want to know whether there is a more graceful approach? Thanks.
AB#34069027