79459302

Date: 2025-02-22 09:06:03
Score: 0.5
Natty:
Report link

Oh I overlooked the workaround mentioned in that issue, which doesn't seem to cause noticeable performance overhead:

In C#:

private struct MyResult
{
    public IJSObjectReference? Value { get; set; }
}

js.InvokeAsync<MyResult>(...)

In JavaScirpt:

return {
    value: something ? DotNet.createJSObjectReference(something) : null
};
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: yueyinqiu