.NET5 RC1 Blazor JS interop issue with HTML element return type. #26496
Labels
area-blazor
Includes: Blazor, Razor Components
✔️ Resolution: Answered
Resolved because the question asked by the original author has been answered.
Status: Resolved
I have an issue with JS interop. In the following scenario JS should return an HTML element which is stored as
ElementReference
in Blazor. Later at some point in the code I would like to use the stored reference.I know about the
@ref=""
usage but the problem is I have different components so cannot access the active element of thedocument
.Here is the JS
Blazor code which tries to store the
JSObjectReference
And it fails various errors based on the active HTML element type
In case of a element
In case of a simple
The text was updated successfully, but these errors were encountered: