-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Returning an HTML element from a JS interop call throws an exception. #23369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is there a workaround? |
Related: #26496 |
Just to make it clear: As I get it: Issues arise when using older libraries that are using Community-provided BlazorCanvas, for example. Images to be drawn required to be passed as However, you can pass an |
Related to #26049? |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thanks for contacting us. We're moving this issue to the |
Thanks for contacting us. We're moving this issue to the |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Describe the bug
When using
IJSRuntime.InvokeAsync<ElementReference>(...)
to invoke a JS function that returns an HTML element, the following exception is thrown:This exception happens regardless of whether the HTML element being returned from the JS function is being passed in from .NET as an
ElementReference
.To Reproduce
See https://github.com/MackinnonBuck/blazor-element-reference-bug. Build and run the Blazor project, then click the button labeled "Return ElementReference from JS". The full exception is displayed in the browser's console.
Exceptions
Further technical details
Blazor WebAssembly project (.NET standard 2.1)
Output of
dotnet --info
:IDE: Visual Studio Enterprise 2019
The text was updated successfully, but these errors were encountered: