Interaction with DOM
When an object does not interact with Blazor, only mutate the DOM with JS. Blazor keeps track of DOM representations and interacts with DOM objects directly. If JS is used either directly or through JS interop to modify an element that Blazor has rendered, the DOM may not match Blazor’s internal version of it.
JS interop calls are always asynchronous, regardless of whether the code being called is synchronous or asynchronous. This is to ensure compatibility between the Blazor Server and Blazor WebAssembly hosting models.
Call JS from .NET
Call .NET from JS