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
Description
The transition to using a custom closure instead of eval broke the return value of InvokeJS.
Reproduction Steps
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