Why is createJSObjectReference
not usable for functions?
#55259
Answered
by
oroztocil
trungnt2910
asked this question in
Q&A
-
This means things like this will fail: await using var func = await JSRuntime.InvokeAsync<IJSObjectReference>("window.alert");
await func.InvokeVoidAsync("call", "Hello World!"); Why is that check there in the first place? Without such restrictions, issues like #31151 are basically solved. |
Beta Was this translation helpful? Give feedback.
Answered by
oroztocil
Apr 14, 2025
Replies: 1 comment 2 replies
-
This has been implemented in #61453 which relaxes the condition to: if (jsObject && (typeof jsObject === "object" || jsObject instanceof Function)) { ... } |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
trungnt2910
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This has been implemented in #61453 which relaxes the condition to: