How do I pass a reference to a HTML element to a method?
The following raises an exception:
var a: dynamic := Browser.GetElementById('helloWorld');
DoSomthingWithElement(a);
method DoSomthingWithElement(el: dynamic);
begin
writeLn('Child Count: ' + el.children.length);
end;
http://127.0.0.1:14428/wasm/RemObjectsElements.js:298 Fatal exception in WebAssembly!
http://127.0.0.1:14428/wasm/RemObjectsElements.js:298 Exception: RemObjects.Elements.System.DynamicInvokeException: No overload with these parameters
!> Exception of type RuntimeError on thread 0001
!> Message: RuntimeError: unreachable
!> at ElementsRaiseException (wasm-function[2378]:0xa21d0)
!> at ms_t11__1sDynamicHelpers6_Invokenoni32na_o (wasm-function[2677]:0xae5ef)
!> at ms_t11__1sDynamicHelpers6_Invokenonsni32na_o (wasm-function[2676]:0xae2ae)
!> at mi_t25_Dynamic__Parameter__Passing_d_Programa_HelloWorld (wasm-function[2689]:0xb1776)
!> at imp.env.__island_invoke (http://127.0.0.1:14428/wasm/RemObjectsElements.js:480:42)
!> at ms_te__1sWebAssemblyc_InvokeMethodnp_vna_o (wasm-function[1077]:0x6e57e)
!> at mi_td__1sMethodInfo6_Invokenona_o (wasm-function[1095]:0x6f378)
!> at mi_tnte__1sWebAssembly18__l__g_c____DisplayClass117__l_GetProxyFor_g_b____2nt13__1sEcmaScriptObject (wasm-function[861]:0x666f1)
!> at mi_t16__1sWebAssemblyDelegate6_Invokent13__1sEcmaScriptObject (wasm-function[618]:0x5d439)
!> at __island_call_delegate (wasm-function[2379]:0xa21fb)