Full example on GitHub
SpawnDev has two libraries that let C# use browser APIs: SpawnDev.BlazorJS and SpawnDev.SpawnJS. If you are starting a project, or you already use one, you will want to know which to pick and what moving costs.
The short answer: start new projects on SpawnJS. If your app runs well on BlazorJS, there is no rush; it is still supported. When you do move, most of your code stays the same.
What each one is
SpawnDev.BlazorJS was first published in December 2022 and has over 222,000 NuGet downloads. It works through Blazor's own JavaScript interop.
SpawnDev.SpawnJS is the newer library.…