How do I pass a (new class) as a parameter to a button component without the function executing without click event is triggered.
class cDevice {
new() {
//something here;
}
}
device: {
// the (new cDevice).new() is what I want to pass.
createNew: function () { (new cDevice).new() },
}
This is the parameter will be used for, execute (new cDevice).new() when button click event is triggered.
"<button onclick=" + device.createNew + ">new</button>"
Thank you!