-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScript
Description
Description
The transition to using a custom closure instead of eval broke the return value of InvokeJS.
Reproduction Steps
var res = Interop.Runtime.InvokeJS(@"1 + 2", out int exceptionalResult);
if (exceptionalResult != 0)
throw new Exception("InvokeJS failed " + res);
else if (res != "3")
throw new Exception("InvokeJS returned invalid result " + res);Expected behavior
Doesn't throw
Actual behavior
Throws, exception message indicates there was no return value
Regression?
Yes
Known Workarounds
If you put 'return' in the JS expression it may work
Configuration
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
arch-wasmWebAssembly architectureWebAssembly architecturearea-System.Runtime.InteropServices.JavaScript