Unable to use interop functionality

Hi Team,

We are trying to give a call to JavaScript function from WebAssembly (Eval function).
But the return value is not as expected or returned from the JavaScript function.

For implementation referred link Interop
Version : RemObjects Elements with Water - 10.0.0.2613

Please find below code and attached example.

method Program.Main;
begin

var el := Browser.GetElementById('helloWorld');
if el = nil then begin
	writeLn('Element by ID test is null!');
	exit;
end;

var t2 := Browser.CreateTextNode('Hello from Elements WebAssembly!');
el.appendChild(t2);

var x := Eval("NewLogin()");
Console.WriteLine(x.ToString());

end;

_______________________________ JavaScript ___________________
In between of script tag below code

var program;
Module1.instantiate("wasm/Module1.wasm").then(function (result) {
  console.log("WebAssembly file Module1.wasm has been loaded.");
  program = result.Program();
  program.Main();
});

function NewLogin() {
  console.log("NewLogin calling..!");
  return 55;
}

Module1.zip (455.9 KB)

Kindly help.

Thanks

Reproduced; this looks like a bug; I’ll log to have someone have a look at this ASAP. thanx!

—marc

Thanks, logged as bugs://85761

bugs://85761 got closed with status fixed.