📜  c# from javascript with callback - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:45.039000             🧑  作者: Mango

代码示例1
//MrSticksEntertainment
//JavaScript
window.external.CallbackTest(function(msg) {alert(msg)})

//C#
public void CallbackTest(object callback)
{
    dynamic callbackFunc = callback;
    callbackFunc("Hello!");
}