I am struggling to use/understand event handling in webassembly.
How can I create an event handler (eg for a button onclick) that will pass the button evement to the event handler?
For example the following works:
var btn := WebAssembly.GetElementById('myButton');
btn.onclick := new WebAssemblyDelegate((a) -> ButtonClick(a));
writeLn('button inst id: ' + btn.id);
end;
But this gives the compiler error “no such member” for e.id:
method ButtonClick(e: EcmaScriptObject);
begin
writeLn('button click id: ' + e.id);
end;
Thanks
Ian