sps014 / BlazorBindGen

MIT License
16 stars 2 forks source link

Suggestion how to call "Bind" to a Function? #15

Closed GeorgeS2019 closed 2 years ago

GeorgeS2019 commented 2 years ago
instance.bind("ready", function () {
    instance.method1();
    instance.method2();
    instance.method3();
}
GeorgeS2019 commented 2 years ago

@sps014

Do you have suggestion how best to write a lamda statement,

Often the method call the first paramter a List e.g. List, the second parameter is a function(node) { that iteratively going through the node properties ).

sps014 commented 2 years ago
void Callback(JObjPtr[] _)
{
_instance.CallVoid("method1");
_instance.CallVoid("method2");
//..
}
_instance.CallVoid("bind","ready",(JSCallBack)Callback);